    var input = require('fs').readFileSync('/dev/stdin', 'utf8');
    var input_arr = input.split(' ');
    var n = parseInt(input_arr[0]);
    var b = parseInt(input_arr[1]);
    var r = parseInt(input_arr[2]);
     
     
    var less = n % (b + r);
     
    var sum = b * parseInt(n / (b + r), 10);
    if (less <= b) {
    sum += less;
    } else {
    sum += b;
    }
     
    console.log( sum );
