/*     JAI SHREE RAM     */



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

// Big two primes
#define X 1001100011100001111ll
#define mod 1000000007
#define int long long
#define ll long long
#define all(a) a.begin(),a.end()
#define sortall(a) sort(all(a))
#define fo(i, n) for (int i = 0; i < n; i++)
#define fo1(i, n) for (int i = 1; i <= n; i++)
#define loop(i,a,b) for (int i = a; i < b; i++)
#define nloop(i,a,b) for (int i = a ; i>=b;i--)
#define tc(t) int t; cin >> t; while (t--)
#define arrip(a,n)  int a[n]; fo(i, n) cin >> a[i];
#define arrop(a,n)  fo(i,n) cout<<a[i]<<" ";
#define pb push_back
#define mp make_pair
#define itr(it, a) for(auto it = a.begin(); it != a.end(); it++)
#define PI 3.1415926535897932384626

#define fio ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL)
#define rr return 0
#define prec(n) fixed<<setprecision(n)
#define maxpq priority_queue<int>
#define minpq priority_queue<int, vector<int>, greater<int> >
#define inf (int)(1e18)
#define ini(a, i) memset(a, i, sizeof(a))
#define vi vector<int>
#define fi first
#define se second
#define endl "\n"
#define pi pair<int, int>
#define vpi vector<pi>
#define sz(s) s.size()
#define bits(n) __builtin_popcount(n)
//const int MAXN = (int)((1e5) +` 100);
//int gcd(int a, int b) { if (a == 0) return b; return gcd(b % a, a);}
int max(int a, int b) {if (a > b) return a; else return b;}
int min(int a, int b) {if (a < b) return a; else return b;}


void solve() {

	long long n;
	cin>>n;

	for(ll i=1;;i++){
		if(stoll(to_string(i)+to_string(i))>n){
			cout<<i-1<<endl;
			return;
		}
	}

}
int32_t main()
{

	fio;

#ifndef ONLINE_JUDGE
	freopen("fi.txt", "r", stdin);
	freopen("fo.txt", "w", stdout);
#endif
	//tc(t)
		solve();
}
#include <iostream>
#include <cassert>
#include <numeric>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <queue>
#include <map>
#include <cmath>
#include <set>
#include <stdio.h>
#include <string>
using namespace std;
using Graph = vector<vector<int>>;
using ll=long long;
using pa=pair<ll,ll>;



int main() {
  vector<ll> ans(0);
 for (int i = 1; i <= 5000; i++)
 {
   
   
ll p=3;
ll n=i;
ll sq=sqrt(i);
ll ile=11;
bool f=false;
vector<ll> num={5,7,11};
   for (int j = 0; p<=11&&n>1; )
   {
     if (n%p==0)
     {
      n/=p;
        f=true;
     }else
     {
       p=num[j];
       j++;
     
     }
     
     
   }

  if (f)
  {
   ans.push_back(i*2);
  }
  
   
 }
 ll pp=3*5*7*11;
  
ll N;
cin>>N;
cout<<pp<<" ";
 for (int i = 0; i < N-1; i++)
 {
   cout<<ans[i]<<" ";
 }

 cout<<endl;

}
