"use strict";
function main(input) {
  const inputs = input[0].trim().split(" ").map(i => parseInt(i));
  const n = inputs[0];
  const a = inputs[1];
  const b = inputs[2];

  const edge = ((n-Math.floor(n/(a+b))*(a+b))<=a)?(n-Math.floor(n/(a+b))*(a+b)):a;
  const almost = Math.floor(n/(a+b))*a;

  const result = edge + almost;
  
  console.log(result);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"));