N = int(input()) now = 0 ans = 0 for i in range(10**7+1): if N-now>=100: now += 500 else: ans = i break print(ans)