#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <map>

using namespace std;

int main() {
	int A, B, C, D;
	cin >> A >> B >> C >> D;
	int budget = min(A, B) + min(C, D);
	cout << budget << endl;
	return 0;
}
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
typedef long long ll;
#define rep(i, s, e) for (int i = s; i < e; i++)
#define endl '\n'
int main()
{
    int n, x, t;
    cin >> n >> x >> t;
    int ans = (n +x-1)/x * t;
    cout << ans << endl;
}