
/*
   Bismillahir rahmanir rahim
   Name : Mir Rifat
   Bsmrstu.
*/

#include <bits/stdc++.h>
using namespace std ;
typedef    long long    ll;
#define    fastio      ios_base::sync_with_stdio(false),cin.tie(NULL)
#define    T           int t,q; cin >> t; for(q=1;q<=t;q++)
#define    Forn(i,n)   for(int i=0;i<n;i++)
#define    ForN(i,n)   int i;for(i=n-1;n>=0;i--)
#define    Sort(s)     sort(s.begin(),s.end())
#define    ff          first
#define    ss          second
#define    pb          push_back
#define    mem(a)      memset(a,0,sizeof a)
#define    memn(a)     memset(a,-1,sizeof a)
#define    pi          acos(-1
#define    PI          3.1415926535

#define  Int(f)         cin>>f;
#define  Pnt(k)         cout<<k<<endl;
#define yy()             cout<< "YES"<<endl;
#define nn()             cout<< "NO"<<endl;
void solve(){
string s;cin>>s;
cin>>s;
ll ans=0;
for(int i=0;i<9;i++){
    if(s[i]=='Z' && s[i+1]=='O' && s[i+2]=='N' && s[i+3]=='e'){
        ans++;
    }
}
cout<<ans<<endl;
}


int main(){
    //int t;cin>>t;while(t--)
        solve();
    return 0;
  }
#include <bits/stdc++.h>
using namespace std;
#define clr(a) memset(a, 0, sizeof(a))
#define full(a) memset(a, 0x3f, sizeof(a))
#define mset(a, b) memset(a, b, sizeof(a))
#define cpy(a,b) memcpy(a, b, sizeof(a))
#define fornext(x, i) for(signed i = hd[x], y = ver[i]; i; i = nxt[i], y = ver[i])
#define Rep(i, a, b) for(signed i = (signed)(a); i <= (signed)(b); ++i)
#define dRep(i, a, b) for(signed i = (signed)(a); i >= (signed)(b); --i)
#define IOset(a) freopen(a".in", "r", stdin), freopen(a".out", "w", stdout);
#define pb push_back
#define It iterator
#define endl '\n'
#define un unsigned
#define int ll
#define ll long long
#define db double
#define rept cerr<<1.0*clock()/CLOCKS_PER_SEC<<endl;
#define dbg cout<<"c "
#define dbug(x) cerr << #x " = " << (x) << endl
template<typename _T> inline void _prt(_T _d) { cerr << _d << ' '; }
template <typename _T, typename ...Args> inline void _prt(_T _d, Args ..._a) { _prt(_d), _prt(_a...); }
template <typename _T, typename ...Args> inline void prt(_T _d, Args ..._a) { _prt(_d), _prt(_a...), cerr<<endl; }
template <typename _T, typename ...Args> inline void prt(_T _d) { cerr << _d <<endl; }
template<typename _T> inline void rd(_T &_d) {
	signed _f; char _c; _f = 1,_d = 0; while (_c = getchar(), !isdigit(_c)) if(_c=='-') _f=-1;
	while (isdigit(_c)) _d = _d * 10 + _c - '0', _c = getchar();
	_d=_f*_d;
}
template <typename _T, typename ...Args> inline void rd(_T &_d, Args &..._a) { rd(_d); rd(_a...); }

// const int N=

signed main() {
	int n;
	rd(n);
	--n;
	printf("1155 ");
	Rep(i,1,5000) {
		if(!n) break;
		if(i%3==0||i%5==0||i%7==0||i%11==0) --n,printf("%d ",i*2); 
	}
	return 0;
}
