#include<bits/stdc++.h>
#define ll long long int
#define iamspeed ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define nl "\n"
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define fl(i,a,b) for(ll i=a;i<b;i+=1)
#define rl(i,a,b) for(ll i=a;i>b;i-=1)
#define input(a,n) fl(i,0,n)cin>>a[i];
#define printt(a,n) fl(i,0,n) cout<<a[i]<<' ';
#define all(a) a.begin(),a.end()
#define test() ll t; cin>>t; while(t--)
#define maxelement(arr,n) *max_element(arr,arr+n)
//typedef long long ll;
const int INF = 1e9 + 1;
const int MOD = 1e9 + 7;
const int N = 1e6;
using namespace std;




int main(){
	iamspeed;
	long n,x,h;
	cin>>n>>x;
	fl(i,0,n){
		cin>>h;
		if(h!=x){
			cout<<h<<" ";
		}
	}
	cout<<endl;
}

//APPROACHING A QUESTION
//+ Think of binary search (max of min etc also if n<=2*10^5)
//+ Think of common dp states (Even if it appears as maths 
//but constraints are small)
//+ Check constraints
//+ Keep calm and enjoy the question
//+ Be sure to remove MOD from binpow (if needed)
//+ Try bidirectional analysis for constructive questions
//+ If given some sequence try thinking of prefix sums
//+ If constraints are too large maybe its simple maths
//+ In questions with binary operations think of bits independently 
//and also the change pattern
//+ If two or more binary operations are given mostly there is 
//a relation between them and an arithmatic operator
//+ multi sorce bfs
// credits: fischerman
#include <bits/stdc++.h>
using namespace std;

mt19937_64 llrand((int) chrono::steady_clock::now().time_since_epoch().count());

#define st first
#define nd second
#define pb push_back

#ifndef ONLINE_JUDGE
  #define db(x) cerr << #x << " == " << x << endl
  #define dbs(x) cerr << x << endl
  #define _ << ", " <<
#else
  #define db(x) ((void)0)
  #define dbs(x) ((void)0)
#endif

typedef long long ll;
typedef long double ld;

typedef pair<int, int> pii;
typedef pair<int, pii> piii;
typedef pair<ll, ll> pll;

const int INF = 0x3f3f3f3f, MOD = 1e9+7;
const int N = 1e5+5;

const ll MAX = 1e13;

ll n;
int p[35];

ll exp(ll b, ll e) {
  ll ans = 1;
  for(int i = 1; i <= e; i++) ans *= b;
  return ans;
}

int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  cin >> n;

  ll ans = 1ll;


  for(ll i = 2; i <= n; i++) {

    ll aux = i;
    for(ll k = 2; k <= aux; k++) {
      int cnt = 0;
      while(aux % k == 0) {
        aux /= k;
        cnt++;
      }

      p[k] = max(p[k], cnt);
    }
    
  }

  for(int i = 2; i <= n; i++) ans = ans * exp(i, p[i]);

  ans++;

  cout << ans << "\n";
  assert(ans >= n and ans <= MAX);
  for(ll i = 2; i <= n; i++) assert(ans % i == 1);
}

