import Foundation

/*
// 1
let N = Int(readLine()!)!

// 1 2
let split = readLine()!.componentsSeparatedByString(" ")
let N = Int(split[0])!
let S = Int(split[1])!

// 1 2 3 4 5
let array = readLine()!.componentsSeparatedByString(" ").map { Int($0)! }

func pow(_ number: Int, multiplier: Int) -> Int {
  var answer = 1
  for _ in 0 ..< multiplier {
    answer *= number 
  }
  return answer
}


*/
let split = readLine()!.componentsSeparatedByString(" ")
let N = Int(split[0])!
let A = Int(split[1])!
let B = Int(split[2])!
var answer = 0
answer = (N / (A + B)) * A
let surplus = N % (A + B)
if surplus < A {
	answer += surplus
} else {
 	answer += A 
}
print(answer)