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