#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long int lli;
typedef unsigned long long int ulli;
typedef long double ld;
#define vec(s) vector<s>
#define vvec(s) vector<vector<s>>
typedef vector<lli> vi;
typedef vector<vi> vvi;
typedef pair<lli, lli> pii;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define Yes(x) cout << (x ? "Yes" : "No") << endl;
#define YES(x) cout << (x ? "YES" : "NO") << endl;
#define out(s) cout << s << endl;
#define Reverse(x) reverse(all(x));
#define Sort(x) sort(all(x));
#define pb(s) push_back(s);
#define sp " "
#define INF 10000000000
#define LINF 9000000000000000000
#define all(s) s.begin(), s.end()
void vout(vi v)
{
    for (lli i = 0; i < v.size(); i++)
        cout << v.at(i) << endl;
}
int main()
{
    cout << std::fixed << std::setprecision(10);
    lli n;
    cin >> n;
    map<lli, lli> rec;
    rep(k, n)
    {
        map<long long int, long long int> prime;
        long long int nc = k + 1;
        long long int i = 2;
        while (nc != 1)
        {
            if (i * i > nc)
            {
                if (prime.count(nc))
                    prime.at(nc) += 1;
                else
                {
                    prime[nc] = 1;
                }
                break;
            }
            if (nc % i == 0)
            {
                long long int count = 0;
                while (nc % i == 0)
                {
                    nc /= i;
                    count++;
                }
                if (prime.count(i))
                    prime.at(i) += count;
                else
                {
                    prime[i] = count;
                }
            }
            i++;
        }
        for(auto v: prime){
            if(!rec.count(v.first)||(rec.count(v.first)&&rec[v.first]<v.second)){
                rec[v.first] = v.second;
            }
        }
    }
    lli ans = 1;
    for(auto v: rec){
        ans *= pow(v.first, v.second);
    }
    ans++;
    out(ans);
}
#include <iostream>
using namespace std;
template <class T> T gcd(T a, T b) {
	if (b == 0) return a;
	return gcd(b, a % b);
}
template <class T> T lcm(T a, T b) {
	return a / gcd(a, b) * b;
}
int main()
{
  long long N;
  cin >> N;
  long long div = 1;
  for (long long i = 2; i <= N; i++) {
    div = lcm(i, div);
  }
  cout << div+1 << endl;
  return 0;
}


