function main(input) {
  var inputs = input[0].split(" ");
  var N = parseInt(inputs[0]);
  var A = parseInt(inputs[1]);
  
  if(A === 0){
  console.log(0);
  }else{
    var AB = A + parseInt(inputs[2]);
    var quotient = Math.floor(N / AB);
    var remainder = N % AB;
    if (remainder >= A){
      console.log(quotient * A + A);
    }else{
      console.log(quotient * A + remainder);
    }
  }
}

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