const input = require("fs").readFileSync("/dev/stdin", "utf8")
const lines = input.split('\n')
const [N, A, B] = lines[0].split(' ').map(Number)
const ans = Math.floor(N / (A + B)) * A + Math.min(N % (A + B), A)
console.log(ans)