#include int main() { int L, M, N; std::cin >> L >> M >> N; while (N >= 25) { M++; N -= 25; } while (M >= 4) { L++; M -= 4; } while (L >= 10) { L -= 10; } int count = L + M + N; std::cout << count << std::endl; return 0; }