#include <iostream>
using namespace std;
#define int long long
int gcd(int a,int b)
{
    return b?gcd(b,a%b):a;
}
int LCM(int a, int b)
{
    return a/gcd(a, b)*b;
}
signed main()
{
    int n, m , s;
    
    cin>>n;
    s = 1;
    for (int i = 2; i <=n; i++)
        s = LCM(s, i);
    
    s++;

    cout<<s;
    
    return 0;
}
#include<bits/stdc++.h>
using namespace std;

int main()
{

        long long n,m,a,b=13,c,d,e,f,g,h,p,q,r,fr,sc,tr,sz=0,tz,i,j,k,mx=LLONG_MIN,mn=LLONG_MAX;
        long long x=1,y=1,cnt=0,res=0,ans=1,sum=0; long long flg=0,flag=1,na=0,as=1;
        vector<long long>u,v,w; vector< pair<long long,long long> >vct; vector<string>vst;
        set<long long>st,nt,tt; map<long long,long long>mp,nq,qr; string str,ttr,ntr;

        cin>>n;

        ans=ans*2; mp[2]=1; ans=ans*3; mp[3]=1;

        g=2;

        for(i=3;i<=30;i++)
        {
            d=(g*i)/(__gcd(g,i));

            g=d;

        }

        //cout<<g<<endl;

        for(i=4;i<=30;i++)
        {

            fr=i;

            c=0;

            while(fr%2==0)
            {
                fr=fr/2; c++;  if(c>mp[2]){  mp[2]=c; ans=ans*2;  }
            }

            for(j=3;j*j<=fr;j+=2)
            {
                c=0;

                while(fr%j==0)
                {
                    fr=fr/j;  c++;  if(c>mp[j]){  mp[j]=c; ans=ans*j;   }
                }

            }

            c=0;

            if(fr!=1)
            {
                c=1;

                if(c>mp[fr]){  mp[fr]=c; ans=ans*fr;  }
            }


        }

        cout<<ans+1<<endl;








    return 0;
}



