function Main(input) {
    input = input.split(" ");
    var n = Number(input[0]);
    var b = Number(input[1]);
    var r = Number(input[2]);
    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)
            }
            
        }
    }
}

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