import re n=open(0).read() assert re.fullmatch('[0-9]*\n',n) assert(len(n)>0 and n[0]!='0') n=int(n) assert(1<=n<=3500000)