#include "bits/stdc++.h"
using namespace std;

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

    const std::string find_word("ZONe");
    std::string::size_type pos = s.find(find_word);
    while (pos != std::string::npos)
    {
        ans++;
        // std::cout << pos << std::endl;
        pos = s.find(find_word, pos + find_word.length());
    }
    cout << ans << endl;
    
}
#include<bits/stdc++.h>
using namespace std;
#define endl '\n'
typedef long long int ll;

#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for(auto it = d.b;it != d.e;++it)
    *this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "

ll binom(ll n, ll k){
  if(k == 0)return 1;
  vector<bool> down(12, false);
  ll up = 1;
  for(ll i = n;i > k;i--){
    up *= i;
    for(ll j = 2;j <= 11;j++){
      if(!down[j] && up % j == 0){
        up /= j;
        down[j] = true;
      }
    }
  }
  for(ll i = 2;i <= 11;i++){
    if(down[i])continue;
    up /= i;
  }
  return up;
}

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

  ll n;cin >> n;
  cout << binom(n - 1, n - 12) << endl;
}
