#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

class Bigint
{
    static const long long MAX = 1000000000LL;
    vector<long long> a;
    bool sign;
public:
    Bigint(){
        sign = true;
    }
    Bigint(long long x){
        if(x < 0){
            sign = false;
            x *= -1;
        }else
            sign = true;
        while(x > 0){
            a.push_back(x % MAX);
            x /= MAX;
        }
    }
    Bigint(const string& s){
        sign = true;
        long long tmp = MAX;
        for(int i=s.size()-1; i>=0; --i){
            if(tmp == MAX){
                a.push_back(0);
                tmp = 1;
            }
            if('0' <= s[i] && s[i] <= '9'){
                a.back() += (s[i] - '0') * tmp;
                tmp *= 10;
            }else
                sign = false;
        }
    }
    long long getNum(){
        long long ret = 0;
        for(int i=a.size()-1; i>=0; --i){
            ret *= MAX;
            ret += a[i];
        }
        return ret * (sign? 1:-1);
    }
    string getStr() const{
        ostringstream oss;
        if(!sign)
            oss << '-';
        for(int i=a.size()-1; i>=0; --i){
            oss << a[i];
            oss << setw(9) << setfill('0');
        }
        return oss.str();
    }
    Bigint operator+(const Bigint& x) const{
        if(sign ^ x.sign){
            Bigint tmp = x;
            tmp.sign = !tmp.sign;
            return *this - tmp;
        }
        Bigint ret;
        ret.sign = sign;
        long long carry = 0;
        unsigned i = 0;
        while(i < a.size() || i < x.a.size() || carry > 0){
            if(i < a.size())
                carry += a[i];
            if(i < x.a.size())
                carry += x.a[i];
            ret.a.push_back(carry % MAX);
            carry /= MAX;
            ++ i;
        }
        return ret;
    }
    Bigint operator-(const Bigint& x) const{
        if(sign ^ x.sign){
            Bigint tmp = x;
            tmp.sign = !tmp.sign;
            return *this + tmp;
        }
        Bigint ret;
        long long carry = 0;
        unsigned i=0;
        while(i < a.size() || i < x.a.size()){
            if(i < a.size())
                carry += a[i];
            if(i < x.a.size())
                carry -= x.a[i];
            if(carry < 0){
                ret.a.push_back(MAX + carry);
                carry = -1;
            }else{
                ret.a.push_back(carry);
                carry = 0;
            }
            ++ i;
        }
        if(carry == -1){
            ret.sign = !ret.sign;
            for(unsigned j=0; j<ret.a.size(); ++j)
                ret.a[j] = MAX - ret.a[j] - 1;
            ++ ret.a[0];
        }
        while(ret.a.size() > 0 && ret.a.back() == 0)
            ret.a.pop_back();
        return ret;
    }
    Bigint operator*(const Bigint& x) const{
        if(a.size() == 0 || x.a.size() == 0)
            return 0;
        Bigint ret;
        ret.sign = !(sign ^ x.sign);
        ret.a.assign(a.size() + x.a.size(), 0);
        for(unsigned i=0; i<a.size(); ++i){
            for(unsigned j=0; j<x.a.size(); ++j){
                ret.a[i+j] += a[i] * x.a[j];
                ret.a[i+j+1] += ret.a[i+j] / MAX;
                ret.a[i+j] %= MAX;
            }
        }
        if(ret.a.size() > 0 && ret.a.back() == 0)
            ret.a.pop_back();
        return ret;
    }
    bool operator<(const Bigint& x) const{
        if(sign ^ x.sign)
            return x.sign;
        if(a.size() != x.a.size())
            return !(sign ^ (a.size() < x.a.size()));
        for(int i=a.size()-1; i>=0; --i){
            if(a[i] != x.a[i])
                return !(sign ^ (a[i] < x.a[i]));
        }
        return false;
    }
};

void integerFactorization(int n, vector<int>& base, vector<int>& expo)
{
    base.clear();
    expo.clear();
    int a = 2;
    while(a * a <= n){
        int b = 0;
        while(n % a == 0){
            ++ b;
            n /= a;
        }
        if(b > 0){
            base.push_back(a);
            expo.push_back(b);
        }
        ++ a;
    }
    if(n > 1 || base.size() == 0){
        base.push_back(n);
        expo.push_back(1);
    }
}

int main()
{
    int n;
    cin >> n;

    map<int, int> m;
    for(int i=2; i<=n+1; ++i){
        vector<int> base, expo;
        integerFactorization(i, base, expo);

        for(unsigned j=0; j<base.size(); ++j)
            m[base[j]] = max(m[base[j]], expo[j]);
    }

    Bigint a(1);
    for(map<int, int>::iterator it=m.begin(); it!=m.end(); ++it){
        for(int i=0; i<it->second; ++i)
            a = a * it->first;
    }
    a = a + 2;

    cout << a.getStr() << endl;
    for(int i=2; i<n+2; ++i)
        cout << i << endl;

    return 0;
}

Measured memory_bytes: 1264