"use strict";
function Main(input) {
  const nums = input.split(" ").map(Number);
  const set = Math.floor(nums[0] / (nums[1] + nums[2]));
  const remains = nums[0] % (nums[1] + nums[2]);
  const left = remains < nums[1] ? remains : nums[1];
  console.log(nums[1] * set + left);

}
Main(require("fs").readFileSync("/dev/stdin", "utf8"))