#include <algorithm>
#include <numeric>
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <numeric>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#define DEBUG(x) std::cout << '>' << #x << ':' << x << '\n';
#define PRINTVEC(x) for (int i = 0; i < (int)x.size(); i++) std::cout << x[i] << ' '; std::cout << '\n';
#define PRINTPAIR(x) for (int i = 0; i < (int)x.size(); i++) std::cout << x[i].first << ' ' << x[i].second << '\n'; std::cout << '\n';
#define PRINTSET(x) for (auto it = x.begin(); it != x.end(); it++) { std::cout << *it << ' '; } std::cout << '\n';
#define io std::ios_base::sync_with_stdio(false);std::cin.tie(NULL);   
const int INF = 1<<29;
const double PI = acos(-1.0);
typedef long long ll;
const std::vector<int> GRID = {0,1,0,-1,0}; // for(k < 4) r=x+GRID[k],c=y+GRID[k+1]; if(0<=r&&r<m&&0<=c&&c<n) do smthg;
using namespace std;

// 3, 7, 13, 61, 61, 421, 841, 2521 


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

int main()
{
	io;
    #ifndef ONLINE_JUDGE
    //freopen("input.txt", "r", stdin); 
    //freopen("output.txt", "w", stdout);  
    #endif

    ll n; cin >> n;
    ll ans = 1;
    for (ll i = 2; i <= n; i++) {
        ans = lcm(ans,i); 
    }   
    cout << ans + 1 << endl;

    #ifndef ONLINE_JUDGE   
    std::cout << '\n' << "Time elapsed : " << 1.0 * clock() / CLOCKS_PER_SEC << " sec \n";
    #endif
    return 0;
}

// #pragma GCC target ("avx2")
// #pragma GCC optimization ("O2")
// #pragma GCC optimization ("unroll-loops")
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define int ll
#define pb push_back
#define mp make_pair
#define pob pop_back
#define __bp __builtin_popcount
using pii = pair<int,int>;
using pil = pair<int,ll>;
using pli = pair<ll,int>;
using pll = pair<ll,ll>;
using pdd = pair<ld,ld>;
using vint = vector<int>;
using vll = vector<ll>;
using vpii = vector<pii>;
using vpil = vector<pil>;
using vpli = vector<pli>;
using vpll = vector<pll>;
#define F first
#define S second
const int N = 1e5+5;
const int Inf = 1e9+7;
// const int Inf = 998244353;
const ll INF = 1e18+7;
const int Mod = 998244353;
const ld eps = 1e-9;
#ifndef M_PI
#define M_PI 3.1415926535
#endif
// const int M = 1e7+5;

void io()
{
	ios_base::sync_with_stdio(0);
	cin.tie(NULL);
	// freopen("sparse.in", "r", stdin);
	// freopen("sparse.out", "w", stdout);
	// cout << setprecision(9) << fixed;
}

int n;

ll gc(ll x, ll y)
{
	if (y == 0)
		return x;
	return gc(y, x % y);
}

void solve()
{
	ll ans = 1;
	cin >> n;
	for (int i = 2; i <= n; ++i)
	{
		ll x = ans * i / gc(ans, i);
		ans = x;
	}
	cout << ans + 1;
}

signed main()
{
	io();
	int tt = 1;
	// cin >> tt;
	while (tt--) {
		solve();
		// cerr << '\n';

	}
}