s = list(input())

flg = True
i = 0
cnt = 0

while flg:
    flg = False
    while i < len(s)-1:
        if s[i]+s[i+1] == '01' or s[i]+s[i+1] == '10':
            s.pop(i)
            s.pop(i)
            flg = True
            cnt += 2
        else:
            i += 1
    i = 0

print(cnt)