var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var input_arr = input.split(' ');
var n = input_arr[0];
var b = input_arr[1];
var r = input_arr[2];


var less = n % (b + r);

var sum = b * (n / (b + r));
if (less <= b) {
sum += less;
} else {
sum += b;
}

console.log( sum );