import Foundation

let input = readLine()!.components(separatedBy: " ").map{ Int($0)!}
let N = input[0]
let blue = input[1]
let red = input[2]

let pareNum = N / (red + blue)
let remain = N % (red + blue)
var blueBall = 0

if remain > blue {
    blueBall += blue
}else {
    blueBall += remain
}
blueBall += pareNum * blue

print(blueBall)