#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
#define REP(i,n) for(int i=0,_n=(int)(n);i<_n;++i)
#define ALL(v) (v).begin(),(v).end()
#define CLR(t,v) memset(t,(v),sizeof(t))
template<class T1,class T2>ostream& operator<<(ostream& os,const pair<T1,T2>&a){return os<<"("<<a.first<<","<<a.second<< ")";}
template<class T>void pv(T a,T b){for(T i=a;i!=b;++i)cout<<(*i)<<" ";cout<<endl;}
template<class T>void chmin(T&a,const T&b){if(a>b)a=b;}
template<class T>void chmax(T&a,const T&b){if(a<b)a=b;}



const int SIZE = 1000000;
vector<int> primes;
bool isPrime[SIZE];

void make_primes() {
  if (primes.size() > 0) return;
  memset(isPrime, true, sizeof(isPrime));
  isPrime[0] = isPrime[1] = false;
  for (int i = 2; i * i < SIZE; i++) 
    if (isPrime[i])
      for (int j = i * i; j < SIZE; j += i)
        isPrime[j] = false;
  REP(i, SIZE) if (isPrime[i]) primes.push_back(i);
}


ll gcd(ll a, ll b) {
  return b == 0 ? a : gcd(b, a%b);
}


int nextInt() { int x; scanf("%d", &x); return x;}

vector<int> solve(int N) {

  const int MAX_N = 30000;
  bool vis[MAX_N + 1] = {};
  int K = 0;

  ll pp = 1;
  for (int i = 2; i <= MAX_N; i++) {
    if (isPrime[i]) {
      pp *= i;
      vis[i] = true;
      K++;
      for (int j = i + i; j <= MAX_N; j += i) {
        if (!vis[j]) K++;
        vis[j] = true;
      }
      if (i >= 3 && K >= N) {
        set<int> ansSet;
        vector<int> ans;
        for (int i = 0; (int)ans.size() < N - 1; i++) {
          if (vis[i]) {
            ans.push_back(i);
            ansSet.insert(i);
          }
        }
        ll As = 0;
        REP(i, ans.size()) As += ans[i];
        int last = 2;
        while (last <= 30000) {
          if (ansSet.count(last) == 0 && (last + As) % pp == 0 && gcd(As, last) != 1)
            break;
          last++;
        }
        if (last > 30000) {
          ans.push_back(999999);
        } else {
          ans.push_back(last);
          return ans;
        }
      }
    }
  }
  return vector<int>();
}

bool check(vector<int> v, int N) {
  if ((int)v.size() != N) {
    cout << "size " << N << " " << v.size() << endl;
    return false;
  } 
  set<int> st;
  for (auto x : v) {
    
    if (x > 30000) {
      cout << "over 30000" << endl;
      return false;
    }
  }
  for (auto x : v) st.insert(x);
  if (st.size() != v.size()) {
    cout << "not uniq." << endl;
    return false;
  }
  
  ll S = 0;
  for (auto x : v) S += x;
  for (auto x : v) {
    if (gcd(x, (int)(S - x)) == 1) {
      cout << "gcd " << x << " " << (S-x) << " is " << gcd(x, (S-x)) << endl;
      return false;
    }
  }
  return true;
}

int main2(int N) {
  
  vector<int> ans = solve(N);  

  // if (!check(ans, N)) {
  //   cout << "Wrong:" << N << endl;
  //   pv(ALL(ans));
  //   exit(1);
  // }


  REP(i, N) {
    if (i > 0) cout << " ";
    cout << ans[i];
  }
  cout << endl;
  
  return 0;
}

int main() {
  make_primes();
  // int p = 0, np = 0;
  // for (int i = 2; i <= 30000; i++) {
    // if (isPrime[i]) p++; else np++;
  // }
  // cout << p << "  " << np << endl;
  // for (;!cin.eof();cin>>ws)
    main2(nextInt());
  // for (int i = 3; i <= 20000; i++) { cout << i << endl; main2(i); }
  return 0;
}


Measured memory_bytes: 2680