object Main {
  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)
    val n: BigInt = BigInt.javaBigInteger2bigInt(sc.nextBigInteger())
    val blue: BigInt = BigInt.javaBigInteger2bigInt(sc.nextBigInteger())
    val red: BigInt = BigInt.javaBigInteger2bigInt(sc.nextBigInteger())

    val sum = blue.+(red)
    val division = n./(sum)
    val reminder = n.%(sum)

    val reminderBlue =
      if (reminder.<(blue)) {
        reminder
      } else {
        blue
      }

    val ans = (division.*(blue)).+(reminderBlue)

    println(ans.toString())
  }
}
