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