
import scala.annotation.tailrec
object Main extends App {

  import scala.io.StdIn._
  import scala.math._

  val a = readLine.trim
  println((0 until a.length).count{i ⇒
    canMake(a.take(i), a.drop(i))
  })
  def canMake(diff: String, sum: String): Boolean = {
    if (diff != "" && diff(0) == '0') false
    else if (sum == "" || sum(0) == '0') false
    else {
      if (diff == "") canMake(0, sum.toInt)
      else canMake(diff.toInt, sum.toInt)
    }
  }
  def canMake(diff: Int, sum: Int): Boolean = {
    if (diff % 2 != sum % 2) false
    else {
      val x = (diff + sum) / 2
      val y = sum - x
      x >= 0 && y >= 0
    }
  }
  implicit class Extension[T](val value :T){
    def also(func: T ⇒ Unit): T = {
      func(value)
      value
    }
    def let[R](func: T ⇒ R): R = func(value)
  }
}
