var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var str= input.trim();
var cnt=0;
for(var i=0;i<str.length;i++){
   var a=str.slice(0,i)-0;
   var b=str.slice(i);
   if(b[0]==0)continue;
   b=b-0;
   if(a>b)break;
   if(a%2==0 && b%2==0)cnt++;
   if(a%2==1 && b%2==1)cnt++;
}
console.log(cnt);
