L = int(input()) M = int(input()) N = int(input()) Z = 1 M = M + N // 25 N = N % 25 L = L + M // 4 M = M % 4 Z = Z + L // 10 L = L % 10 print(L+M+N)