import math def money(L, M, N): add_M= N // 25 remainder_N= math.floor(N % 25) add_L= (M + add_M) //4 remainder_M= math.floor(M % 4) remainder_L= math.floor((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()