#include<bits/stdc++.h>
using namespace std;
int main()
{
    int a,b,c,d,sum;
     cin>>a>>b>>c>>d;
     if(a>b && c>d)
        sum=b+d;
     else if(a>=b && c<=d)
        sum=b+c;
        else if(a<=b && c<=d)
        sum=a+c;
        else if(a<=b && c>=d)
        sum=a+d;
         cout<<sum<<endl;

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
    double n, x, t;
    cin>>n>>x>>t;
    double t1 = ceil(double(n/x));
    //cout<<n/x<<endl;
    //cout<<t1<<endl;
    ll t11 = ll(t1)*ll(t);
    cout<<t11<<endl;

}
