#include <cmath>
#include <algorithm>
#include <bitset>
#include <iostream>
#include <set>
#include <string>
#include <tuple>
#include <unordered_set>
#include <vector>
using namespace std;

int main()
{
  ios_base::sync_with_stdio(false);

  string input;
  cin >> input;

  auto sub = input;
  size_t itr = 0;
  int count = 0;
  for (size_t i = 0; i < input.length(); i++)
  {
    if (sub.find("ZONe") == string::npos)
      break;

    count++;
    itr = sub.find("ZONe");
    if (itr > input.length() - 4)
      continue;
    sub = sub.substr(itr + 4);
  }

  cout << count << endl;

  return 0;
}

#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <set>
#include <queue>
#include <cmath>

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<long long> vll;
typedef vector<vector<long long>> vvll;
typedef pair<int,int> pii;
typedef pair<long long, int> pli;
typedef pair<int, long long> pil;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define rrep(i, n) for(int i = (int)(n)-1;i >= 0;i--)
#define repr(i, a, b) for(int i = (int)a; i <= (int)b; i++)
#define all(x) (x).begin(),(x).end()
#define sz(x) (x).size()

constexpr ll mod = 998244353;

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

ll inv(ll x){
    ll res = 1;
    ll k = mod - 2;
    ll y = x;
    while(k){
        if(k&1)res = (res*y)%mod;
        y = (y*y) % mod;
        k /= 2;
    }
    return res;
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    string s;
    cin >> s;
    string ret = "Yes";
    rep(i,s.length()) {
        if (s[i] >= 'a' && s[i] <= 'z') {
            if (i % 2 != 0) ret = "No";
        } else {
            if (i % 2 != 1) ret = "No";
        }
    }
    cout << ret << endl;
}
