L = int(input()) M = int(input()) N = int(input()) T = (L * 100) + (M * 25) + (N * 1) S = T // 1000 T -= S * 1000 H = T // 100 T -= H * 100 Q = T // 25 T -= Q * 25 I = T // 1 print(H + Q + I)