'use strict';

function main(input) {
  const inputs = input.split('\n').map((x) => x | 0);

  const N = inputs[0];
  const K = inputs[1];
  const X = inputs[2];
  const Y = inputs[3];

  let total = 0;
  for (let i = 1; i <= N; i++) {
    if (i <= K) {
      total += X;
    } else {
      total += Y;
    }
  }
  console.log(total);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
