a = '1000000007' b = input() x = a.count('0') y = b.count('0') print(abs(x - y))