n = int(input()) # nはint型 if 1000000007 > n: print(n); else : print(int(n/1000000007));