#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
long long gcd(long long x,long long y){return y?gcd(y,x%y):x;}
int lcm(int x,int y){return x/gcd(x,y)*y;}
int main()
{    
  int n;
  long long temp=0,ans=1;        
  cin>>n;        
  for(int i=2;i<=n;i++) 
  {                
	 temp=gcd(ans,i);            
	 ans=ans/temp*i;   
	 //cout<<ans<<endl;     
  }        
  ans++;
  printf("%lld",ans);
  return 0;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
//const ll INF = numeric_limits<ll>::max() / 4;
//const int INF = numeric_limits<int>::max() / 4;


int main() {
	// ll N;
	string S;
	cin >> S;

	bool f = true;
	string s = "ZONe";
	int c = 0;
	while(f){
		int p = S.find(s);
		if(p < S.size()){
			c++;
			S[p] = '.';
		}else{
			f = false;
		}
	}

	cout << c << endl;
	return(0);
}
