s = list(input())
flag = True
cnt=0

while flag:
    flag = False
    n = len(s)
    for i in range(n-1):
        k = s[i]+s[i+1]
        if (k=="01") or (k=="10"):
            del(s[i:i+2])
            flag = True
            cnt+=1
            break

print(cnt*2)