import std.stdio;
import std.regex;

void main(){
	auto io = new IO();
	
	auto N = io.line()[0];
	auto K = io.line()[0];
	auto X = io.line()[0];
	auto Y = io.line()[0];
	
	size_t fee = 0;
	
	if( N>K ){
		fee += K*X;
		fee += (N-K)*Y;
	}else{
		fee += N*X;
	}
	writeln(fee);
	return;
}

import std.stdio,std.conv,std.string;
import std.algorithm,std.array,std.math;

immutable PRIME = 1_000_000_007;
immutable alphaB = "abcdefghijklmnopqrstuvwxyz";
immutable alphaU = "ABCDRFGHIJKLMNOPQRSTUVWXYZ";
class IO
{
	T[] line( T = size_t , string token = " " )( size_t m = 1 ){
		T[] arr = [];
		foreach( i ; 0..m ){
			arr ~= this.read!T();
		}
		return arr;
	}
	T[][] rect( T = size_t , string token = " " )( size_t m = 1 ){
		T[][] arr = new T[][](m);
		foreach( i ; 0..m ){
			arr[i] = this.read!T(token);
		}
		return arr;
	}
	private T[] read( T = size_t )( string token = " " ){
		T[] arr;
		foreach( elm ; readln().chomp().split(token) ){
			arr ~= elm.to!T();
		}
		return arr;
	}
	void swap( T )( ref T x , ref T y ){
		x = x^y;
		y = x^y;
		x = x^y;
	}
}