#include <bits/stdc++.h>
#define rep(a,n) for (ll a = 0; a < (n); ++a)
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
typedef vector<vector<ll> > Graph;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const ll INF = 1e18;

//エラトステネスの篩
std::vector<bool> IsPrime;
void sieve(size_t max){
    if(max+1 > IsPrime.size()){     // resizeで要素数が減らないように
        IsPrime.resize(max+1,true); // IsPrimeに必要な要素数を確保
    }
    IsPrime[0] = false; // 0は素数ではない
    IsPrime[1] = false; // 1は素数ではない

    for(size_t i=2; i*i<=max; ++i) // 0からsqrt(max)まで調べる
        if(IsPrime[i]) // iが素数ならば
            for(size_t j=2; i*j<=max; ++j) // (max以下の)iの倍数は
                IsPrime[i*j] = false;      // 素数ではない
}

int main(){
    int n;
    cin >> n;
    vector<int>ans;
    sieve(56000);
    int now = 11;
    while(ans.size()!=n){
        if(IsPrime[now]){
            ans.push_back(now);
        }
        now += 10;
    }
    rep(i,n){
        cout << ans[i] << endl;
    }

    return 0;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, a, b) for(ll i=(a); i<(b); i++)
#define PER(i, a, b) for(ll i=(a); i>=(b); i--)
#define rep(i, n) REP(i, 0, n)
#define per(i, n) PER(i, n, 0)
#define ALL(a)  (a).begin(),(a).end()
const ll INF = 1e18+18;
const ll MAX = 200000;
const ll MOD = 1000000007;
#define Yes(n) cout << ((n) ? "Yes" : "No") << endl;
#define YES(n) cout << ((n) ? "YES" : "NO") << endl;
static const double pi = 3.141592653589793;




int main(){
    ll N;
    cin>>N;
    if(N==0){
        cout<<0<<endl;
        return 0;
    }
    if(N==1){
        cout<<1<<endl;
        return 0;
    }
    if(N>0){
        ll Num=0;
        ll Key=1;
      	ll Keta=-2;
        while(Num<N){
            Num+=Key;
            Key*=4;
          	Keta+=2;
        }
        ll Dif=Num-N;
        ll J=1;
        cout<<1;
        vector<ll> W(Keta, 0);
      	ll i=0;
        while(Dif>0){
            W[i]=Dif%2;
          	i++;
            Dif/=2;
        }
        
        rep(i, Keta){
            if(J+1){
				cout<<W[Keta-1-i];
            }else{
              	cout<<(1-W[Keta-1-i]);
            }
          
          	J*=-1;
        }
    }
  	if(N==-1){
      	cout<<11<<endl;
      return 0;
    }
  	if(N<0){
      	ll Num=0;
        ll Key=2;
      	ll Keta=-1;
        while(Num<N*-1){
            Num+=Key;
          	Keta+=2;
            Key*=4;
        }
        ll Dif=Num-N*-1;
      	cout<<1;
        vector<ll> W(Keta, 0);
      	ll i=0;
        while(Dif>0){
            W[i]=Dif%2;
          	i++;
            Dif/=2;
        }
      	ll J=1;
        rep(i, Keta){
            if(J+1){
				cout<<W[Keta-1-i];
            }else{
              	cout<<(1-W[Keta-1-i]);
            }
          
          	J*=-1;
        }
    }
}
    