n = int(input()) n -= 100 if n < 0: print(0) exit() n = (n + 499) // 500 print(n)