L = int(input()) M = int(input()) N = int(input()) sho, N = divmod(N, 25) M += sho sho, M = divmod(M, 4) L += sho X, L = divmod(L, 10) print(L + M + N)