#include<bits/stdc++.h>

using namespace std;

namespace WHH
{
	typedef long long ll;
	
	int N;
	ll ans;
	
	inline ll gcd(ll a,ll b)
	{return ((b==0)?a:gcd(b,a%b));}
	
	inline ll lcm(ll a,ll b)
	{return a/gcd(a,b)*b;}
	
	int work()
	{
		scanf("%d",&N);
		ans = 1;
		for(int i=2;i<=N;i++) ans = lcm(ans,i);
		++ans;
		printf("%lld",ans);
		return 0;
	}
}

int main() {return WHH::work();}
#include<iostream>
#include<cstring>
#include<string>
#include<algorithm>
#include<cmath>
#include<vector>
#include<cstdlib>
#include<bitset>
#include<stack>
#define fio cin.tie(0);ios_base::sync_with_stdio(false)
#define ll long long
using namespace std;
int main(){
    ll int k;
    cin>>k;
    ll int a = 1;
    for(ll int i=2;i<=k;i++){
        a=a*i/__gcd(a,i);
    }
    cout<<a+1<<endl;
}