#include #include using namespace std; typedef long long int lint; int main() { lint L, M, N, T, S = 0; cin >> L >> M >> N; T = L * 100 + M * 25 + N; S += T / 1000; T %= 1000; S += T / 100; T %= 100; S += T / 25; T %= 25; S += T; cout << S << endl; return 0; }