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