#include<iostream>
#include<sstream>

using namespace std;

#define rep(i, n) for (int i = 0; i < int(n); ++i)

template<class A, class B> B convert(A a) {
  stringstream ss;
  ss << a;
  B b;
  ss >> b;
  return b;
}

int main() {
  string a;
  cin >> a;
  int x, y;
  int ans = 0;
  rep (i, a.size() + 1) {
    if (i == 0) {
      x = 0;
    } else {
      if (a[0] == '0') continue;
      x = convert<string, int>(a.substr(0, i));
    }
    if (i == (int)a.size()) {
      y = 0;
    } else {
      if (a[i] == '0') continue;
      y = convert<string, int>(a.substr(i));
    }
    if (x % 2 != y % 2) continue;
    if (x + y < 0) continue;
    if (y - x < 0) continue;
    ++ans;
  }
  cout << ans << endl;
}