#include<iostream>
#include<iomanip>
#include<string>
#include<vector>
#include<algorithm>
#include<utility>
#include<queue>
#include<math.h>
#include<stack>
#include<set>
#include<map>
#include<ctime>
#include<cstdlib>
#include<fstream>
#define INF long long (int)1e18+1
#define MAX 50000001
#define rep(i,n,m) for(int i=n;i<m;i++)

using namespace std;

int main() {	
	long long n;
	cin >> n;
	vector<long long>a;
	n *= 2;
	rep(i, 1, 1500000) {
		if ((long long)i * (long long)i > n)break;
		if (n % i == 0) {
			a.push_back(i);
			if ((long long)i * (long long)i == n)continue;
			a.push_back(n / i);
		}
	}
	long long ans = 0;
	for (auto x : a) {
		long long s = n / x;
		if ((s - (x - 1)) % 2 == 0)ans++;
	}
	cout << ans << endl;
}

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

int main(){
  string S;
  cin >> S;
  int ans=0;
  for(int i=0; i<9; i++){
    if(S.at(i)=='Z' && S.at(i+1)=='O' && S.at(i+2)=='N' && S.at(i+3)=='e'){
      ans++;
    }
  }
  cout << ans;
}