import java.lang.Math.*
import java.util.*

fun main(args: Array<String>) {
    val scn = Scanner(System.`in`)
    val N = scn.nextLong()
    val A = scn.nextLong()
    val B = scn.nextLong()

    var p = N/(A+B)
    var d = N-p*(A+B)

    println(p*A + min(A,d))
}