import scala.io.StdIn._

object Main extends App {
  val nums = readLine.split(" ").map(_.toLong)
  val N = nums(0)
  val A = nums(1)
  val B = nums(2)

  val numChunks = N / (A + B)
  val remaining = N % (A + B)

  println(numChunks * A + (if (remaining > A) A else remaining))
}
