def money(L, M, N): add_M= N // 25 remainder_N= N % 25 M += add_M add_L= M // 4 remainder_M= M % 4 L += add_L remainder_L= L + add_L % 10 Total_remainder= remainder_L+remainder_M+remainder_N return Total_remainder def main(): L= int(input()) M= int(input()) N= int(input()) result= money(L, M, N) print(result) main()