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