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