#include <iostream>
using namespace std;

int main() {
    string s;
    int count=0; 
    cin >> s;

    for(int i=0; i<=8; i++) {
        if(s[i]=='Z'&&s[i+1]=='O'&&s[i+2]=='N'&&s[i+3]=='e'){
            count++;
        }
    }

    cout << count << endl;

    return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define ll long long

ll gcd(ll a,ll b){
  if(b==0) return a;
  return gcd(b,a%b);
}

int main(){
  ll n;
  cin>>n;
  vector<ll>v(n+1);
  v[2]=2;
  for(ll i=3;i<=n;i++){
    ll g=gcd(i,v[i-1]);
    //cout<<"gcd of "<<i<<" "<<v[i-1]<<" "<<g<<endl;
    v[i]=(i*(v[i-1]))/g;
    //cout<<v[i]<<endl; // testing

  }

  cout<<v[n]+1<<endl;

}
