#include<iostream>
#include<string>
using namespace std;
int main()
{
	string s;
	cin >> s;
	if ((s.at(0) == s.at(1)) && (s.at(1) == s.at(2)))
	{
		cout << "Won\n";
	}
	else
	{
		cout <<"Lost\n";
	}
	return 0;
}
#include <bits/stdc++.h>
#include<iostream>
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define lli unsigned long long int
#define forit(it, a) for(__typeof(a.begin()) it = a.begin(); it != a.end(); it++)
#define fori(i,n) for(int j=i;j<n;j++)
#define pb push_back
#define ff first
#define ss second
#define pp pair<int,int>
#define mod  1000000007
using namespace std;
bool isV(char ch)
{
return(ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u');
}
void tc()
{
          
int n,m,x;
 string s;
 cin>>s;
 n=s.size();
 string t="ZONe";
 int cnt=0;
 for(int i=0;i<n-3;i++)
 {
     if(t==s.substr(i,4))
     cnt++;
 }         
 cout<<cnt;           
                     
                     
}
int main()
{
IOS;
ios_base::sync_with_stdio(false);
cin.tie(nullptr); cout.tie(nullptr);
     
//lli q; cin>>q; while(q--)
                      
tc();
                                   
      
return 0;
}