L = int(input()) M = int(input()) N = int(input()) s = 100 * L + 25 * M + 1 * N h = s % 1000 t = h % 100 print(h // 100 + t // 25 + t % 25)