function Main(input) {
    input = input.split(" ");
    var n = parseInt(input[0], 10);
    var b = parseInt(input[1], 10);
    var r = parseInt(input[2], 10);
    if (n === 0 || b === 0 || r === 0) {
        console.log(0);
    } else {
        var k = n / (b + r);
        if (k == 1 || k < 1) {
            console.log(b)
        } else {
            var nk = n - (b + r) * Math.floor(k);
            if (nk >= b) {
                console.log(b * Math.floor(k) + b);
            }else { 
                console.log(b * Math.floor(k) + nk);
            }
        }
    }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));