function Main(input) {
	var line = input.split('\n');
	var N = parseInt(line[0], 10);
	var K = parseInt(line[1], 10);
	var X = parseInt(line[2], 10);
	var Y = parseInt(line[3], 10);
	var anser = 0;
	for(var i=0; i<N; i++){
		if(i < K){
			anser += X;
		}else{
			anser += Y;
		}
	}
	console.log(anser);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));