import java.util.Scanner

fun main(args: Array<String>) {
	val scn = Scanner(System.`in`)
	val n = scn.nextLong()
	val a = scn.nextLong()
	val b = scn.nextLong()
	val k = n / (a+b)
	val r = n % (a+b)
	print(k*a+Math.min(r, a))
}