function main(input){
  var N = Number(input[0]);
  const A = Number(input[1]);
  const B = Number(input[2]);
  
  var value1 = Math.floor(N >= A + B ? Math.floor(N / (A + B)) * A : A);
  var value2 = Math.floor(N >= A + B ?  N % (A + B) : 0);
  console.log(N >= A ? value1 + value2 : N);
}

main(require('fs').readFileSync('/dev/stdin','utf8').split('\n')[0].split(' '));