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