function Main(input){
	var N = parseInt(input.trim().split(" ")[0]);
  	var A = parseInt(input.trim().split(" ")[1]);
  	var B = parseInt(input.trim().split(" ")[2]);
  	if(A === 0){
    	console.log(0);
    }else{
		var d = Math.floor(N/(A+B));
    	var r = N - ((A+B)*d);
      	if(r===0){
          	console.log(d*A);
        }else if(r>A){
			console.log(d*A + A);
        }else{
        	console.log(d*A + r);
        }
	}
}
Main(require("fs").readFileSync("/dev/stdin","utf8"));