s = input()
n = len(s)
count = 0

while True:
    if '10' in s:
        s = s.replace('10','',1)
        count += 2
    elif '01' in s:
        s = s.replace('01','',1)
        count += 2
    else:
        break

print(count)
