#37848: py五行解


zhoudaniel02@gmail.com (周孝倫)


s = input()

a = sum((ord(s[i]) - 48) * (-1) ** i for i in range(len(s)))

print(abs(a))