s = str(input())
num = 0
m = 1
for i in range(min(s.count('1'),s.count('0'))):
    t = num
    for i in range(len(s)-1):
        if (s[i]=='0' and s[i+1]=='1') or (s[i]=='1' and s[i+1]=='0'):
            num += 2
            s = s[:i]+ s[i+2:]
            break
    if t == num:
        break
print(num)