#include <bits/stdc++.h>
#include <vector>
#include<math.h>
#include<string.h>
using namespace std;
#define MAX 300005
#define MOD 1000000007
#define INF 1000000000000000000
#define EPS 0.0000000001
#define FASTIO ios_base::sync_with_stdio(false);cin.tie(NULL)
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
int main()
{
    int n;
    //int p[]={2,3,5,7,11,13,17,19,23,29};
    scanf("%d",&n);
    /*long long x=1;
    int i;
    for(i=0;i<10&&p[i]<=n;i++)
    {
        int m=n;
        while(m>=p[i])
        {
            m=m/p[i];
            x=x*p[i];
        }
    }
    printf("%lld",x+1);*/
    printf("2329089562801");
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
using Graph = vector<vector<int>>;
#define rep(i, n) for (int i = 0; i < n; ++i)
const ll INF=1000000010;

ll gcd(ll x, ll y) { return (x % y)? gcd(y, x % y): y; }
ll lcm(ll x, ll y) { return x / gcd(x, y) * y; }

int main(){
  ll n;
  cin>>n;
  ll x=2;
  for(ll y=3;y<=n;y++){
    x = lcm(x,y);
  }
  cout << x+1 << endl;
  return 0;
}