import sys
input = sys.stdin.readline
s = list(input())
ans = 0
s.append('n')
while 'n' in s:
    s = [i for i in s if i != 'n']
    for i in range(len(s)):
        if s[i:i+2]==['1', '0'] or s[i:i+2]==['0', '1']:
            ans += 2
            s[i:i+2] = ['n','n']
print(ans)
