L = int(input()) * 100 M = int(input()) * 25 N = int(input()) total = L + M + N count = int(total / 1000) total = total % 1000 count += int(total / 100) total = total % 100 count += int(total / 25) total = total % 25 count += total / 1 print(int(count))