"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const N = parseInt(arg[0].split(" ")[0]);
    const A = parseInt(arg[0].split(" ")[1]);
    const B = parseInt(arg[0].split(" ")[2]);
    
    const sum = A + B;
    const mod = N % sum;
    
    let answer = 0;
    
    answer += A * Math.floor(N / sum);
    
    if(mod < A) {
        answer += mod;
    } else {
        answer += A;
    }
    
    console.log(answer);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
