a = list(str(1000000007)) b = list(str(input())) A = a.count("0") B = b.count("0") ans = abs(A - B) print(ans)