import sys str=input() count=0 for i in range(1,len(str)): a=str[0:i][-1] b=str[i:][-1] if (int(a)+int(b))%2==0: count+=1 print(count)