a, b, c = [int(i) for i in input().split()] q1, mod1 = divmod(a, 25) b += q1 q2, mod2 = divmod(b, 4) c += q2 q3, mod3 = divmod(c, 10) total = mod1 + mod2 + mod3 print(total)