//in dp prefix suffix sum helps..
#include<iostream>
#include<vector>
#include<string.h>
#include<algorithm>
#include<iomanip>
#include<cmath>
#include<stack>
#include <iterator>
#include <map>
#include<list>
#include <fstream>
#include<unordered_map>
#include<set>
#include<queue>
#define int  long long
#define double long double
#define pb   push_back
#define mp   make_pair
#define pii  pair<int,int>
#define pip pair<int, pair<int, int> >
#define viv vector<vector<int> >
#define vip vector< pair<int, int > >
#define vi vector<int>
#define mii  map<int, int>
#define li list<int>
#define qu queue<int>
#define vd vector<double>
#define set set<int>
#define stack stack<int>
#define fi first
#define se second
#define mem(x, y) memset(x, y, sizeof(x))
#define ps(x,y) fixed<<setprecision(y)<<x
using namespace std;
// author :: Anurag Anand.
using namespace std;
int z=  1e9+7;
//int z= 998244353;
int gcd(int a, int b){
    if(a==0)return b;
    if(b==0)return a;
    return gcd(b, a%b);
}
int power(int a,int b)
{
	int res=1;
	while(b)
	{
		if(b&1)
		{
			res=(res*a)%z;
			b--;
		}
		else
		{
			a=(a*a)%z;
			b=b>>1;
		}
	}
	return res;
}
int32_t main()
{
    ios_base::sync_with_stdio(false);
	cin.tie(NULL);
    cout.tie(NULL);
	int t;
	t=1;
	//cin>>t;
	while(t--){
		int x;
		cin>>x;
		if(x>=0) cout<<x<<"\n";
		else cout<<"0\n";
	}
}
#include <bits/stdc++.h>
using namespace std;

int gcd(long long a, long long b) {
  if (a % b == 0) return b;
  else return gcd(b, a%b);
}

int lcm(long long a, long long b) {
  return a * b / gcd(a, b);
}

int main() {
  int N;
  cin >> N;
  
  long long x = 2;
  for (int i = 3; i < N+1; i++) {
    x = lcm(x, i);
  }
  
  cout << x + 1 << endl;
  
  return 0;
}