function main(input){
  var N = Number(input[0]);
  const A = Number(input[1]);
  const B = Number(input[2]);
  
  var result = 0;
  for(var i = 0;0 < N;i++){
  	if(i % 2 == 0){
      result += A;
      N -= A;	
    }
    else{
      N -= B;
    }
  }
  console.log(result + N);
}

main(require('fs').readFileSync('/dev/stdin','utf8').split('\n')[0].split(' '));