#include<stdio.h>
int main()
{
    int n,k,x,y,i,sum=0;
    scanf("%d",&n);
    scanf("%d",&k);
    scanf("%d",&x);
    scanf("%d",&y);
    for(i=1;i<=n;i++){
        if(i<=k)
            sum=sum+x;
        else sum=sum+y;
    }
    printf("%d",sum);
    return 0;
}
