#include <bits/stdc++.h>

using namespace std;

#define IOS ios_base::sync_with_stdio(false);   cin.tie(NULL); cout.tie(NULL);

#define endl "\n";


#define mod 1000000007
#define loop(i,s,n)  for(ll i=s;i<n;i++)
#define test  ll t; cin>>t; while(t--)
#define p push_back
typedef long long ll;
ll gcd(ll a, ll b) 
{ 
    if (a == 0) 
        return b; 
    return gcd(b % a, a); 
} 
int main()
{
    
ll n,i,j,k,count=0,sum=1;
cin>>n;
count=(2*3)/gcd(2,3);
for(i=4;i<=n;i++)
{count=(i*count)/gcd(i,count);}
cout<<count+1;


    return 0;
}



#include<iostream>
#include<cstring>
#include<cmath>
#define ll long long

using namespace std;
ll x,n;
ll gcd(ll a,ll b){
	return b?gcd(b,a%b):a;
}
int main(){
	cin>>n;
	ll ans=1;
	for(ll i=2;i<=n;i++){
		ll now=gcd(i,ans);
		//cout<<now<<endl;
		ans*=(i/now);
	}
	cout<<ans+1;
	return 0;
}