
import java.math.BigInteger
import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)

    val n = sc.nextBigInteger()
    val a = sc.nextBigInteger()
    val b = sc.nextBigInteger()
    var sumB : BigInteger

    val count = n/(a+b)
    val l = n - count*(a+b)

    sumB = count*a

    sumB += if(l>=a){
        a
    }else{
        l
    }
    println(sumB)
}
