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