/**
 * Created by hiroqn on 13/10/08.
 */
var fs = require('fs'),
    length = fs.fstatSync(process.stdin.fd).size,
    buffer = new Buffer(length),
    bytesRead = fs.readSync(process.stdin.fd, buffer, 0, length, 0),
    input = buffer.toString('utf8', 0, bytesRead).split('\n');
main();

function main() {
  var
      isMinus = input[0][0] === '-',
      str = isMinus ? input[0].slice(1) : input[0],
      ss1, ss2,//separate string
      si1, si2,
      i,
      x, y,
      ans = 0;
  if ((str - 0) % 2 === 0) {
    ans++;
  }
  for (i = 1; i < str.length; i++) {
    ss1 = str.slice(0, i);
    ss2 = str.slice(i);
    if(ss2[0]==='0'){
      continue;
    }
    si1 = ss1 - 0;
    si2 = ss2 - 0;
//    console.log(ss1, ss2);
    if (si1 > si2) {
      break;
    }
    if ((ss1 + ss2) % 2 === 0) {
      ans++;
//      console.log((si1 + si2) / 2, (si2 - si1) / 2);
    }
  }
  console.log(ans);
}