module ABC158.B

open System

let a = stdin.ReadLine().Split(' ') |> Array.map uint64

let div = a.[0] / (a.[1] + a.[2])
let rem = a.[0] % (a.[1] + a.[2])
let result = div * a.[1] + (min rem a.[1])

printf "%d" result
