s = list(input())
count = 0
flag = True
while flag:
    if  len(s) < 2:
        flag = False
        break
    for i in range(len(s)-1):
        if (s[i] == "0" and s[i+1] == "1") or (s[i] == "1" and s[i+1] == "0"):
            s.pop(i)
            s.pop(i)
            count += 2
            break
        elif i == len(s)-2:
            flag = False
            break
print(count)