#include <iostream>
#include <algorithm>
#include <string>
#include <sstream>
using namespace std;

#define DEBUG(x) cerr << #x << " = " << x << endl

int to_int(const string &s) {
  if(s == "") return 0;
  stringstream ss(s);
  int res;
  ss >> res;
  return res;
}

int main() {
  string S;
  cin >> S;
  int ans = 0;
  for(int i = 0; i <= (int)S.size(); ++i) {
    string L;
    if(i == 0) L = "";
    else L = S.substr(0, i);
    string R;
    if(i == (int)S.size()) R = "";
    else R = S.substr(i);
    if(L.size() > 0 && L[0] == '0') continue;
    if(R.size() > 0 && R[0] == '0') continue;
    int LN = to_int(L);
    int RN = to_int(R);
    if((LN + RN) % 2 == 1) continue;
    int A = (LN + RN) / 2;
    int B = A - LN;
    if(A >= 0 && B >= 0) ans++;
  }
  cout << ans << endl;
}