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