#include<bits/stdc++.h>
#include<stdio.h>
using namespace std;
typedef unsigned long long int ll;
#define MAX 1000000000
#define mod 1000000007

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

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

ll fact(ll n){
    if(n==0)
        return 1;
    else
        return n*fact(n-1);
}

bool dig(char S){
    return S>='0' && S<='9';
}
bool sma(char S){
    return S>='a' && S<='z';
}
bool cap(char S){
    return S>='A' && S<='Z';
}


void solve(ll t){

   ll N;
   cin>>N;
   ll p=1,i;
   for(i=1;i<=N;i++){
    p = lcm(p,i);
   }
   ll r=p+1;/*
   for(i=2;i<=N;i++){
    cout<<r%i<<" ";
   }*/
   cout<<r;


}


int main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    //freopen("D:\\codes\\input_10.txt","r",stdin);
    //freopen("D:\\codes\\1output.txt","w",stdout);
    ll T=1;
    //cin>>T;
    for(ll t=1;t<=T;t++){
        //cout<<"Case #"<<t<<": ";
        solve(t);
        cout<<"\n";
    }
    return 0;
}

#include<bits/stdc++.h>
#include<algorithm>
#define int long long
using namespace std;
signed main(){
	//freopen(".in","r",stdin);
	//freopen(".out","w",stdout);
	//MessageBox(GetForegroundWindow(),"标题","内容",MB_YESNO);
	int n;
	cin>>n;
	int sum=1;
	for(int i=1;i<=n;i++){
		sum*=i/(__gcd(sum,i));
	}
	cout<<sum+1-1+1-1+1-1+1-1+1<<endl;
	return 0;
}
