coins = [int(input()) for _ in range(3)] coins.insert(0,0) l = [25,4,10] for i in range(len(l)): coins[2-i] += coins[3-i] // l[i] coins[3-i] %= l[i] print(sum(coins))