#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
using namespace std;
long long Min(long long a,long long b) {return a<b?a:b;}
int main()
{
freopen("bs.in","r",stdin);
freopen("bs.out","w",stdout);
int max_o,max_x,long_o,long_x;
while(cin>>max_o>>max_x>>long_o>>long_x)
{
long long c_o,c_x,ans=0;
c_x=long_x==0?0:max_x;
c_o=long_o==0?0:max_o;
if(c_x>c_o)
ans=Min(long_x*(c_o+1),max_x)+Min(long_o*c_x,max_o);
else
if(c_o>c_x)
ans=Min(long_o*(c_x+1),max_o)+Min(long_x*c_o,max_x);
else
ans=Min(long_o*c_x,max_o)+Min(long_x*c_o,max_x);
cout<<ans<<endl;
}
return 0;
}