n=int(input()) a=[1,2,4] if n>6: for i in range(7,n+1,3): a.append(i) if n==1: print(a[0]) elif 2<=n<=3: print(*a[:2]) else: print(*a)