import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)
  val n = sc.nextInt()
  val a = sc.nextInt()
  val b = sc.nextInt()

  val x = n / (a + b) * a
  val y = n % (a + b)
  val z = if (y > a) a else y

  println(x + z)
}
