L = int(input())
M = int(input())
N = int(input())
v, N = divmod(N, 25)
M += v
v, M = divmod(M, 4)
L += v
v, L = divmod(L, 10)

print(sum([N, M, L]))