"use strict";
function main(input) {
    let line = input.split(/\r?\n/g);
    let arr = line[0].split(" ");
    const N = BigInt(arr[0]), A = BigInt(arr[1]), B = BigInt(arr[2]);
    if (A <= N % (A + B))
        console.log(((((N + B) / (A + B)) | BigInt(0)) * A).toString());
    else
        console.log((((N / (A + B)) | BigInt(0)) * A + N % (A + B)).toString());
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));