L = int(input()) M = int(input()) N = int(input()) S = 0 M += (N // 25) N = N % 25 L += (M * 25 // 100) M = ((M * 25) % 100)//25 S += (L*100 // 1000) L = ((L*100) % 1000)//100 print(L+M+N)