
function Main(input) {
    // 1行目がinput[0], 2行目がinput[1], …に入る
    const num = input.split(" ");
    var N = num[0];
    var A = num[1];
    var B = num[2];
    var ans = Number(0);
    var rb = Number(0);
    for (var i = N; i >= 0; i = i - rb) {
        rb = rb + A + B;
        ans = ans + A;
        if (Math.abs(i) > B) {
            tmp = Math.abs(i) - B;
            ans = ans - tmp;
        }
    }

    console.log(ans);

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