import java.util.Scanner
import java.lang.Math

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val N = sc.nextLong()
    val A = sc.nextLong()
    val B = sc.nextLong()
    var ans = N / (A + B) * A + Math.min(A, N % (A + B))
    println(ans)
}