function main(input){
  var input=input.split('\n');
  var N=parseInt(input[0],10);
  var K=parseInt(input[1],10);
  var X=parseInt(input[2],10);
  var Y=parseInt(input[3],10);
  var payment=0;
  var daysForX=Math.min(K,N);
  var daysForY=Math.max(0,N-K);
  payment = X*daysForX+Y*daysForY;
  console.log(payment);
}

main(require('fs').readFileSync('/dev/stdin', 'UTF-8'));
