#include<bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(),A.end()
#define RALL(A) A.rbegin(),A.rend()
typedef long long ll;
typedef pair<ll,ll> P;
const ll mod=1000000007;
const ll LINF=1LL<<60;
const int INF=1<<30;
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; }
map<ll,ll> prime_factor(ll n){
	map<ll,ll> res;
	for(ll i = 2; i * i  <= n; i++) {
		while(n % i == 0){
			res[i]++;
			n /= i;
		}
	}
	if (n != 1){
		res[n] = 1;
	}
	return res;
}
int main(){
	int n;cin>>n;
	ll x = 1;
	map<ll,ll> ans;
	for(ll i = 2; i <= n; i++) {
		map<ll,ll> tmp = prime_factor(i);
		for(auto e:tmp) {
			if(ans[e.fs] < e.sc){
				ans[e.fs] = e.sc;
			}
		}
	}
	for(auto e:ans) {
		for(int i = 0; i < e.sc; i++) {
			x *= e.fs;
		}
	}
	for(int i = 2; i <= n; i++) {
		if((x + 1) % i == 1){
			continue;
		}
		else{
			cout << "no" << endl;
		}
	}
	cout << x + 1 << endl;
	return 0;
}
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vl;
typedef pair<ll,ll> ii;
typedef vector<ii> vii;

const int mod = 1e9+7;
const int N = 1e5+2;

#pragma region Debugger
void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}

template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
#define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#define debug(x...)
#endif
#pragma endregion Debugger
 
//My tools
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define rep(i,s,e)  for(int i=s;i<e;i++)
#define repe(i,s,e) for(int i=s;i<=e;i++) 
#define all(v)  (v).begin(),(v).end()


main(){
    int n;ll x;
    cin>>n>>x;
    rep(i,0,n){
        ll a;
        cin>>a;
        if(a!=x) cout<<" "<<a;
    }
}