N=list(input()) collect='1000000007' c_num=collect.count('0') w_num=N.count('0') print(abs(c_num-w_num))