L = int(raw_input()) M = int(raw_input()) N = int(raw_input()) N1, N2 = N // 25, N % 25 M1, M2 = (M + N1) // 4, (M + N1) % 4 L1, L2 = (L + M1) // 10, (L + M1) % 10 print L2 + M2 + N2