#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int inf=0x3f3f3f3f;
const ll INF=0x3f3f3f3f3f3f3f;
const double pi=3.1415926535897932384626;
inline ll read(){
	ll x=0,f=1;
	char ch=getchar();
	while(ch<'0'||ch>'9'){
		if(ch=='-') f=-1;
		ch=getchar();
	}
	while(ch>='0'&&ch<='9'){
		x=(x<<1)+(x<<3)+(ch^48);
		ch=getchar();
	}
	return x*f;
}
ll n;
ll gcd(ll a,ll b){
	if(!b) return a;
	return gcd(b,a%b);
}
int main(){
	n=read();
	ll ans=1;
	for(ll i=2;i<=n;++i) ans=ans*i/gcd(ans,i);
	printf("%lld\n",ans+1);
	return 0;
}
#include<iostream>
using namespace std;

int main(){
	int n;
	cin >> n;
	cout << n - 1;
	return 0;
}