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