L, M, N = [int(input()) for _ in range(3)] q, r = divmod(N, 25) M += q N = r q, r = divmod(M, 4) L += q M = r q, r = divmod(L, 10) L = r print(L+M+N)