import java.util.Scanner

fun main(args: Array<String>){
  val scn = Scanner(System.`in`) //Scannerのインスタンスを作成
  
  val n: Long = scn.nextLong()
  val a: Long = scn.nextLong()
  val b: Long = scn.nextLong()
  val g: Long = a + b
  var result: Long = 0
  val yo = n % g
  val k = (n - yo) / g
  result += k * a
  if (yo <= a) {
    result += yo
  } else {
    result += a
  }
  println(result)
}