#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define pb push_back
#define mkp make_pair
#define mt make_tuple
#define ff first
#define ss second
#define M1 1000000007
#define M2 998244353

#define fl(i,a,b)  for(ll i=a;i<b;i++)
#define bfl(i,a,b) for(ll i=b-1;i>=a;i--)
#define f(i,n)     for(int i=0;i<n;i++)
#define bf(i,n)    for(int i=n-1;i>=0;i--)
#define f1(i,n)    for(int i=1;i<=n;i++)
#define bf1(i,n)   for(int i=n;i>=1;i--)

#define all(v)      v.begin(),v.end()
#define pll         pair<long,long>
#define pii         pair<int,int>
#define vi          vector<int>
#define vll          vector<ll>


#define p0(a)       cout << a << " "
#define p1(a)       cout << a << bn
#define p2(a, b)    cout << a << " " << b << bn
#define p3(a, b, c) cout << a << " " << b << " " << c << bn
#define p4(a,b,c,d) cout << a << " " << b << " " << c << " " << d << bn
#define debug(x)    cerr << #x << " = " << x << endl;

#define max3(a,b,c) max(max(a,b),c)
#define min3(a,b,c) min(min(a,b),c)

#define bn          "\n"
#define pbn         cout<<"\n"



#define TRACE
#ifdef TRACE
    #define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
    template <typename Arg1>
    void __f(const char* name, Arg1&& arg1){
        cerr << name << " : " << arg1 << endl;
    }
    template <typename Arg1, typename... Args>
    void __f(const char* names, Arg1&& arg1, Args&&... args){
        const char* comma = strchr(names + 1, ',');
        cerr.write(names, comma - names) << " : " << arg1<<" | ";
        __f(comma+1, args...);
    }
#else
    #define trace(...) 1
#endif


ll modI(ll a,ll m);
ll gcd(ll a,ll b);
ll powM(ll x,ll y,ll m);


void py(int ok)
{
    if(ok==1){
        cout<<"YES"<<bn;
    }else{
        cout<<"NO"<<bn;
    }
}

void swap(ll& a,ll& b)
{
    ll tp=a;
    a=b;
    b=tp;
}

ll gcd(ll x,ll y)
{
    if(x==0) return y;
    return gcd(y%x,x);
}

ll lcm(ll x, ll y)
{
    if(x==0 || y==0){
        cout<<"Not valid lcm"<<bn;
    }
    
    ll LCM= x/gcd(x,y);
    LCM=LCM*y;
    
    return LCM;
}

ll powM(ll x,ll y,ll m)
{
    ll ans=1,r=1;
    x%=m;
    while(r>0&&r<=y)
    {
        if(r&y)
        {
            ans*=x;
            ans%=m;
        }
        r<<=1;
        x*=x;
        x%=m;
    }
    return ans;
}
 
ll modI(ll a, ll m)
{
    ll m0=m,y=0,x=1;
    if(m==1) return 0;
    while(a>1)
    {
        ll q=a/m;
        ll t=m;
        m=a%m;
        a=t;
        t=y;
        y=x-q*y;
        x=t;
    }
    if(x<0) x+=m0;
    return x;
}

//-----------------------------------------------------------------------------


int main() 
{
	
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(0);
	int tt=1;
    // cin>>tt;
   f1(testcase_no,tt)
   {
       //   cout<<"test case no. "<<testcase_no<<bn;
      
      ll n;
      cin>>n;
      
      bool vis[10001]={0};
      vector<int>v;
      v.pb(6);
      v.pb(15);
      v.pb(10);
    //   int cnt=3;
      vis[6]=1;
      vis[10]=1;
      vis[15]=1;
      
      for(int i=1;i<10001;i++)
      {
          if(v.size()==n)break;
          
          if(vis[i])continue;
          if(i%6==0)v.pb(i);
          else if(i%10==0)v.pb(i);
          else if(i%15==0)v.pb(i);
          vis[i]=1;
          
          if(v.size()==n)break;
      }
      
    //   cout<<v.size()<<bn;
      
      
     for(auto it:v)p0(it);
     pbn;
     
     
       
        // cout << fixed << setprecision(25);
        
   }

	
	return 0;
}

#pragma GCC optimize("Ofast,inline,unroll-loops,fast-math")
#pragma GCC optimize("O3")
#include<bits/stdc++.h>
#define mod 1000000007
#define mod1 998244353
#define INF LLONG_MAX
#define NINF LLONG_MIN
#define inf 1e18
#define all(v) v.begin(),v.end()
#define T ll test;cin>>test; while(test--)
#define rep(i,a,n) for(ll i=a;i<(long long)n;++i)
#define rep1(i,a,n) for(ll i=a;i<=(long long)n;++i)
#define repi(i,a,n) for(int i=a;i<=(int)n;++i)
#define repl(i,a,n) for(int i=a;i<(int)n;++i)
#define PI 3.141592653589793238510
#define en '\n'
#define MAX 100005
#define lesser_time ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define debug cout<<"HERE"<<en;
#define setbits(x)  __builtin_popcountll(x)
#define zrobits(x)  __builtin_ctzll(x)
#define ps(x,y) fixed<<setprecision(y)<<x
#define mk(arr,n,type) type *arr=new type[n];
#define F first
#define S second
#define LB lower_bound
#define UB upper_bound
#define vc vector
#define vi vc<int>
#define mii unordered_map<int,int>
#define pql priority_queue<int>
#define pqs priority_queue<int,vi,greater<int>>
#define vll vector<long long>
#define pll pair<long long,long long>
#define pl pair<int,int>
#define eb emplace_back
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef long double ld;
using namespace std;
using namespace std::chrono;
ll mod_exp(ll x,ll n){ll res=1;while(n>0){if(n&1)res=(res*x)%mod;x=(x*x)%mod;n>>=1;}return res;}
void inout(){freopen("in.txt","r",stdin);freopen("out.txt","w",stdout);}
 
 
int main(){
  lesser_time;
  int a,b,c,d;
  cin>>a>>b>>c>>d;
  cout<<b-c;
return 0;
}