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);
    	if(r > B){
			console.log(d*A+(r-B))
		}else{
			console.log((d*A)+r);
		}
	}
}
Main(require("fs").readFileSync("/dev/stdin","utf8"));