n = int(input()) i = 0 while n-500*i >= 100: i += 1 print(i)