fun main(args: Array<String>) {
    solve()
}

fun solve() {
    val (n,a,b) = readLine()!!.split(' ').map { it.toLong() }

    val c = n/(a+b)
    var bl = c*a
    val re = c*b

    if (bl + re + a <= n) {
        bl += a
    } else {
        bl += (n - (bl + re))
    }

    println(bl)
}