import sys

s = input()

c = 0
for i in range(len(s)-1):
    if (int(s[i]) + int(s[-1])) % 2 == 0:
        c += 1
print(c)