const input = require("fs").readFileSync("/dev/stdin", "utf8")
const lines = input.split('\n')
const [N, A, B] = lines[0].split(' ').map(BigInt)
const ans = N / (A + B) * A + (N % (A + B) < A ? (N % (A + B)) : A)
console.log(ans.toString())