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