L = int(input()) M = int(input()) N = int(input()) T = L * 100 + M * 25 + N c100, r = divmod(T % 1000, 100) c25, c1 = divmod(r, 25) print(c100 + c25 + c1)