const main = (inputs) => {

  const array = inputs[0].split(" ");
  var N = Number(array[0]);
  var A = Number(array[1]);
  var B = Number(array[2]);
  var answer = A * Math.floor(N / (A + B)) + N % (A + B);
  console.log(answer);
}

main(require('fs').readFileSync('/dev/stdin', 'UTF-8').trim().split("\n"));