import re
txt = input()
cnt = 0
while True:
    if re.findall('10',txt):
        a = re.subn('10', '', txt)
        txt = a[0]
        cnt += a[1]
    else:
        if re.findall('01', txt):
            a = re.subn('01', '', txt)
            txt = a[0]
            cnt += a[1]
        else:
            break;
print(int(cnt*2))