#include <bits/stdc++.h>
#include <string>
#include <cmath>
#include <sstream>
#include <unordered_map>
#define FOR(i, a, b) for (ll i = (a); i < (b); i++)
#define FORD(i, a, b) for(ll i = (a-1); i >= (b); i--)
#define pb(a) push_back(a)
#define mp(a,b) make_pair(a,b)
#define ff first
#define ss second
#define spre cout<<fixed<<setprecision(15);
typedef long long int ll;
using namespace std;
//ll mod=67280421310721;
// ll mod=998244353;
ll mod=1000000007;
ll INF=1e18;
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	int test=1;
	// cin>>test;
	while(test--)
	{
		ll n;
		cin>>n;
		ll o=2,g;
		FOR(i,3,n+1)
		{
			g=__gcd(o,i);
			g=i/g;
			o*=g;
		}
		cout<<o+1;
	}
	return 0;
}
#include <math.h>

#include <algorithm>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main() { long long a,b=1,temp[32]={1,2,3,2,5,1,7,2,3,1,11,1,13,1,1,2,17,1,19,1,1,1,23,1,5,1,3,1,29,1,0,0};
    cin >> a;
    for (int i = 0; i < a;i++){
        b *= temp[i];
    }
    cout << b + 1 << endl;
}