#include using namespace std; int main () { int L, M, N; cin >> L >> M >> N; M += L / 25; L %= 25; N += M / 4; M %= 4; N %= 10; cout << L + M + N << endl; return 0; }