// @ts-nocheck
"use strict";
// https://atcoder.jp/contests/abc158/tasks/abc158_b

/** @param {string | string[]} input */
function main(input) {
    let x, y;
    input = input.split(" ");
    let N = +input[0],
        A = +input[1],
        B = +input[2];

    x = Math.floor(N/(A+B));
    y = N%(A+B);
    y = y > A ? A : y;

    x = A*x+y;
    console.log(x);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));
