function main(input){
  var input=input.split('\n');
  var N=parseInt(input[0]);
  var K=parseInt(input[1]);
  var X=parseInt(input[2]);
  var Y=parseInt(input[3]);
  var payment=0;
  var daysForX=Math.min(K,N);
  payment += X*daysForX;
  var daysForY=Math.min(0,N-K);
  payment += Y*daysForY
  console.log(payment);
}
main(require('fs').readFileSync('/dev/stdin', 'UTF-8'));
