N = input() A = "1000000007" print(abs(N.count("0") - A.count("0")))