# coding:utf-8 L, M, N = [int(input()) for i in range(3)] L_m = L * 100 # 100 * 100 M_m = M * 25 # 25 * 100 N_m = N * 1 # 1 * 500 T_m = 0 a = N_m % 25 # 1円の残り枚数 m_total = (N_m - a) // 25 + M_m b = m_total % 100 # 25円の残り枚数 l_total = M_m - b + L_m c = l_total % 1000 # 100円の残り枚数 ans = a + (b // 25) + (c // 100) print(ans)