#include <iostream>
#include<string>
using namespace std;
string nyu,totyu,kekka;
int main() {
	cin >> nyu;
    char totyu = nyu[0];
    string kekka = nyu + totyu;
    kekka = kekka.erase(0,1);
    cout <<kekka;
    return 0;
}
#include<bits/stdc++.h>

using namespace std;


#define ff              first
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define all(a)      (a).begin(),(a).end()

#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define REP(i,n) for(i=0;i<n;i++)
#define FIO             ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
mt19937                 rng(chrono::steady_clock::now().time_since_epoch().count());
const long long   M = 1e9 + 7;

void c_p_c()
{
#ifndef  ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}

int mod(int x) {
	return (x % M + M) % M;
}
int  add(int a, int b)
{
	return mod(mod(a) + mod(b));
}
bool isRoaring(int n)
{
	string s = to_string(n);
}
void solve()
{
	string s;
	cin >> s;
	int c = 0;
	int n = s.size();
	int i;
	for (i = 0; i < n - 3; i++)
	{
		if (s[i] == 'Z' && s[i + 1] == 'O' && s[i + 2] == 'N' && s[i + 3] == 'e')
			c++;
	}
	cout << c << endl;
}
int32_t main()
{

	c_p_c();

	FIO;

	int tt = 1;
	solve();


}


