#include <bits/stdc++.h>
#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
typedef long long ll;
typedef long double ld;
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define mod 1000000007
#define pii pair<ll,ll>
#define inf 1000000000000000000
#define bpc(x) __builtin_popcountll(x)
#define autoit(x,it) for(auto it = x.begin(); it != x.end(); it++)
#define autoitr(x,it) for(auto it = x.rbegin(); it != x.rend(); it++)
#define rep(n) for(ll i = 0; i < n; i++)
#define repi(i,n) for(ll i = 0; i < n; i++)
#define hmap gp_hash_table<ll, ll>

#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds; 

#define ordered_set tree<ll, null_type,less<ll>, rb_tree_tag,tree_order_statistics_node_update> 

using namespace std;
mt19937_64 mt(chrono::steady_clock::now().time_since_epoch().count());

int main()
{
  FAST/**/
  
  ll n;
  cin>>n;
  
  ll tot = 0;
  ll cr = 1;
  while(tot < n)
  {
      tot += cr;
      if(tot >= n)
      {
          cout<<cr<<'\n';
          return 0;
      }
      cr++;
  }
    
  return 0;
}
   
   
 
#include <bits/stdc++.h>
#define LL long long
#define pb push_back
using namespace std;

char a[15],c[5]="ZONe";
int ans;

int main()
{
    scanf("%s",a+1);
    for(int i=1;i<=12;++i) {
        int flag=1;
        for(int j=0;j<4;++j) if(a[i+j]!=c[j]) flag=0;
        ans+=flag;
    }
    cout<<ans;
}