process.stdin.resume();
process.stdin.setEncoding('utf8');

var lines = []
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});

reader.on('line', (line) => {
  lines.push(line);
});

reader.on('close', () => {
 var n = Number(lines[0].split(' ')[0]);
 var a = Number(lines[0].split(' ')[1]);
 var b = Number(lines[0].split(' ')[2]);

 var kiri = Math.floor(n / (a + b));
 var blue = kiri * a;
 var amari = n % (a + b);

 if(amari >= a){
   blue += a;
 }else{
   blue += amari;
 }

 console.log(blue);
});