S = input()

idx = 0
pick = 0
while(("0" in S) and ("1" in S)):
#    print("S = " + S)
    if(S[idx] != S[idx + 1]):
#        print("idx = {} : S[:idx] = {}, S[idx + 2:] = {}, new str = {} ".format(idx, S[:idx], S[idx + 2:], S[:idx] + S[idx + 2:]))
        S = S[:idx] + S[idx + 2:]
        pick = pick + 2
    else:
        idx = idx + 1

    if(idx > len(S) - 2):
        idx = 0

print(pick)
