#!/usr/bin/env python3

s = input()
tmp = 0 
# まず"01"で抜きまくって、次に"10"で抜きまくる。という実装
ans = 0 
while len(s) != tmp:
    tmp = len(s)
    for i in range(len(s)-1):
        if s[i] == '0' and s[i+1] == '1':
            ans += 1
            s = s[0:i]+s[i+2:]
            #print('s =', s)
            break
tmp = 0 
while len(s) != tmp:
    tmp = len(s)
    for i in range(len(s)-1):
        if s[i] == '1' and s[i+1] == '0':
            ans += 1
            s = s[0:i]+s[i+2:]
            #print('s =', s)
            break

print(2*ans)
