#include <iostream>
#include <string>

using namespace std;

#define loop(i,a,b) for(int i=(a); i<(int)(b); i++)
#define rep(i,b) loop(i,0,b)

typedef pair<int,int> P;

int main(){
    string a;
    while(cin>>a){
        int ans=0;
        rep(i,a.size()){
            long int A,B;
            if(i==0){
                A=0;
                B=stol(a);
            } else {
                if(a[i]=='0') continue;
                A=stol("0"+a.substr(0,i));
                B=stol(a.substr(i));
            }
            //cout<<A<<" "<<B<<endl;
            if(A<=B && A%2==B%2) ans++;
        }
        //cout<<"ans ";
        cout<<ans<<endl;
    }
}