#include using namespace std; int main(void) { int L, M, N; cin >> L; cin >> M; cin >> N; int K = 0; while (N >= 25) { N -= 25; M++; } while(M * 25 >= 100) { M -= 4; L++; } while(L * 100 >= 1000) { L -= 10; K++; } cout << L + M + N << endl; return 0; }