#include<bits/stdc++.h>

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

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < n; i++)
const ll mod = 1e9 + 7;

int main(){
  int n;
  cin >> n;
  vector<int>a(n+1);
  for(int i=2;i<=n;i++)a[i]=i;
  for(int i=2;i<=n;i++){
    for(int j=i+1;j<=n;j++){
      if(a[j]%a[i]==0)a[j]/=a[i];
    }
  }
  ll ans=1;
  for(ll i=2;i<=n;i++)ans*=a[i];
  cout << ans+1;
}
