// inputに入力データ全体が入る
function Main(input) {
    var N = input[0].split(" ")[0]-0;
    var A = input[0].split(" ")[1]-0;
    var B = input[0].split(" ")[2]-0;

    var cnt = Math.floor(N/(A+B));
    console.log(cnt*A + Math.min(N-cnt*(A+B), A));


}



Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n"));