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 (b === 0 || r === 0) {
        console.log(0)
    } else {
        var k = n / (b + r);
        if (k >= 1) {
            var nb = b * Math.floor(k);
            if (k === 1) {
                console.log(nb)
            } else {
                var n = n - (b + r) * Math.floor(k);
                console.log(nb + n)
            }

        } else {
            console.log(b)
        }

    }
}

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