#include int main(void){ int L, M, N; int i; scanf ("%d%d%d", &L, &M, &N); i = N / 25; N -= i * 25; M += i; i = M / 4; M -= i * 4; L += i; i = L / 10; L -= i * 10; printf ("%d", L + M + N); return 0; }