L = int(input()) M = int(input()) N = int(input()) q_1,mod_1 = divmod(L,25) M = M + q_1 q_2,mod_2 = divmod(M,4) N = N + q_2 q_3,mod_3 = divmod(N,10) print(mod_1 + mod_2 + mod_3)