L = int(input()) M = int(input()) N = int(input()) s = 0 f = 0 h = 0 G = L * 100 + M * 25 + N #print(G) for i in range(3): if G >= 1000: s = G // 1000 G = G - (1000 * s) #print(G) elif G >= 100: f = G // 100 G = G - (100 * f) #print(G) elif G >= 25: h = G // 25 G = G - (25 * h) #print(G) print(int(G + h + f))