fun main(args: Array<String>) {
    val s = readLine()!!.split(" ").map { it.toLong() }
    val anb = s[1] + s[2]
    val amari = s[0] % anb
    val syou = s[0] / anb
    var blue = syou * s[1]
    var x:Long = 0
    if (amari > s[1]){
        x = s[1]
    } else {
        x = amari
    }
    blue = blue + x
    println(blue)
}

