import os, sys, re, math

S = input()

count = 0
while True:
    i = S.find('01')
    if i >= 0:
        S = S[:i] + S[i+2:]
        count += 2
        continue
    i = S.find('10')
    if i >= 0:
        S = S[:i] + S[i+2:]
        count += 2
        continue
    break

print (count)    
