import sys input = sys.stdin.readline N = int(input()) ans = ((N-99)+499)//500 print(ans)