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