object Main extends App {
  val in = scala.io.Source.stdin.getLines.toSeq
  val ls = in(0).split(' ').map(_.toLong)
  val N = ls(0)
  val A = ls(1)
  val B = ls(2)

  val AB = A + B
  //println(AB)
  val res = N%AB
  //println(res)
  val mod = Math.min(res, A)
  //println(mod)
  val ret = N/AB*A + mod
  println(ret)
}