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

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