n=int(input()) q=0 w=1 a=1 while q>=n: for j in range(2,a): if a%j==0: break else: print(a) q+=a a+=1 w+=1 print(w)