fun main () {
    val (N, A, B) = readLine()!!.split(" ").map(String::toLong)

    val term = (N / (A + B))
    val lastMod = (N % (A + B))

    var blueCount = term * A
    if (lastMod >= A) blueCount += A
    else blueCount += lastMod
    print(blueCount)
}
