"use strict"
function main(arg) {
    var data = arg.trim().split("\n")[0].split(" ").map(Number)
    var N = data[0]
    var A = data[1]
    var B = data[2]
    if (A === 0) {
        console.log(0)
        return
    }
    var a = Math.round(N / (A+B))
    var _N = N - (a * (A+B))
    var b = A
    if (_N <= A) {
        b = _N
    }
    var ans = (a * A) + b
    console.log(ans)

}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
