import sys def input(): return sys.stdin.readline().rstrip() def main(): N = int(input()) print((N+400)//500) if __name__ == '__main__': main()