/* winners never quit and quitters never win.
      #swap                                 */
      
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp> 
using namespace std;
using namespace __gnu_pbds;
#pragma GCC optimize ("-O3")
using ll = long long;
using ld = long double;
const ll mod = 1000000007;
const ll inf = 1000000000000000000;
const ll rk = 256;
const ld PI = 3.141592653589793;

typedef tree<
int,
null_type,
less<int>,
rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;

template <typename T>
void make_unique(vector<T>& vec) {
  sort(all(vec));
  vec.erase(unique(all(vec)), vec.end());
}

#define endl '\n'
#define pb push_back
#define mp make_pair
#define vc vector
#define fs first
#define sec second
#define pql priority_queue<ll>
#define pqh priority_queue<ll,vc<ll>,greater<ll>>
#define lb lower_bound
#define ub upper_bound
#define pll pair<ll,ll> 
#define pls pair<ll,string>
#define psl pair<string,ll>
#define plc pair<ll,char>
#define pcl pair<char,ll>
#define pss pair<string,string>
#define all(x) (x).begin(), (x).end()
#define tol(s) transform(s.begin(),s.end(),s.begin(),::tolower);
#define tou(s) transform(s.begin(),s.end(),s.begin(),::toupper);
#define printclock cerr<<"Time : "<<1000*(ld)clock()/(ld)CLOCKS_PER_SEC<<"ms\n";

#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }

void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
	cerr << *it << " = " << a << endl;
	err(++it, args...);
}

#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
#define T ll t=0;cin>>t;for(ll test=0;test<t;test++)

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());


ll nxt() {
    ll TemporaryVariable;
    cin >> TemporaryVariable;
    return TemporaryVariable;
}

struct custom_hash {
    static uint64_t splitmix64(uint64_t x) {
        // http://xorshift.di.unimi.it/splitmix64.c
        x += 0x9e3779b97f4a7c15;
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        return x ^ (x >> 31);
    }

    size_t operator()(uint64_t x) const {
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(x + FIXED_RANDOM);
    }
};

 
int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);
	//isprime();
	//coeff();
	/*freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);*/
    cout<<21-nxt()-nxt()-nxt()<<endl;
	printclock;
	return 0;
}
#include <bits/stdc++.h>

// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
 
// using namespace __gnu_pbds;

using namespace std;
#define M                    1000000007
#define pi                   3.14159265358979323846
#define ll                   long long
#define lld                  long double

// Pair
#define pii                  pair<int, int>
#define pll                  pair<ll, ll>

// Vector
#define vl                   vector<ll >
#define vi                   vector<int>
#define vpi                  vector<pii>
#define vpl                  vector<pll>
#define pb                   push_back
#define mp                   make_pair


// Search
#define lb                   lower_bound
#define ub                   upper_bound
#define mina                 *min_element
#define mama                 *max_element
#define bsrch                binary_search

////////
#define F                    first
#define S                    second
#define cel(x,a)             ((x + a - 1) / a)
#define all(v)               v.begin(), v.end()
#define allrev(v)            v.rbegin(), v.rend()
#define lcm(m, n)            ((m / __gcd(m, n))*n)
#define deb(...)             cerr << "(" << #__VA_ARGS__ << "):", dbg(__VA_ARGS__)
#define ms(arr, v)           memset(arr, v, sizeof(arr))
#define ps(x,y)              fixed << setprecision(y) << x
#define _X_                  ios_base::sync_with_stdio(false); cin.tie(NULL)

//pbds
#define ordered                 tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>

// Input / Output
#define scn(str)             scanf("%s", str)
#define pri(str)             printf("%s\n", str)


const int N = 1e6 + 4;

inline void  dbg()           { cerr << endl; }


template <typename T, typename... V>
inline void  dbg(T t, V... v) {cerr << ' ' << t; dbg(v...);}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



void solve()
{
    int n;
    cin >> n;
    vi ans = {6,10,15};
    int cur = 18;
    while((int)ans.size()<n)
    {
		assert(cur<=10000);
		int cnt = 0;
		if(cur%2==0)cnt++;
		if(cur%3==0)cnt++;
		if(cur%5==0)cnt++;
		if(cnt>=2)ans.pb(cur);
		cur++;
	}
	for(int &i:ans)cout << i << " ";
	cout << "\n";
		
    
}
int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);cout.tie(0);
    // clock_t time_req = clock();
    int t = 1;
     //cin>> t;
    while (t--) {
       solve();



   }


    // time_req = clock() - time_req;
    // cout << (float)time_req / CLOCKS_PER_SEC;
   return 0;
}
