import java.util.Scanner

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

  val x = n / (a + b) * a
  val y = n % (a + b)
  val z = List(y, a).min

  println(x + z)
}
