#include <bits/stdc++.h>

using namespace std;

#define ll long long




void solve() {

	int arr[3];
	for(int i = 0; i < 3; i++) {
		cin >> arr[i];
	}
	sort(arr, arr + 3);
	cout << arr[0] + arr[1];

	




	
}

int main() {

	ios_base::sync_with_stdio(0);
	cin.tie(NULL);
	solve();

	return 0;
}
#include <bits/stdc++.h>          
using namespace std;               

int main() {
    int N, X, T;
    cin >> N >> X >> T;
    int count=N/X;
    if (N%X!=0) {
        count++;
    }
    cout << count*T << endl;
}