L =int(input())
M = int(input())
N = int(input())
total = 100*L + 25*M + N
total = total%1000
l = total//100
m = (total - 100*l)//25
n = (total - 100*l -25*m)
print(l + m + n)