str=input().strip() total=0 odd_even=0 # 只用判断最后一位以及每一位的奇偶性就好,因为最后一位一直都是第二位的最后一位 if int(str[-1])%2==0: odd_even = 1 for i in range(len(str)-1): if odd_even == 0 and int(str[i])%2 !=0: total+=1 if odd_even == 1 and int(str[i])%2 ==0: total+=1 print(total)