s =list(input())

c = 0


while True:
    if len(s) <= 1:
        break
    
    for i in range(len(s)-1):
        if len(s) <= 1:
            break
        
        k = 0
            
        if ((s[i]+s[i+1]) == '01') or ((s[i]+s[i+1]) == '10'):
            s.pop(i)
            s.pop(i)
        
            c += 2
            k += 1
            break
        
    if k == 0:
        break
    

print(c)