s = list(input())
count = 0
while len(set(s)) == 2:
    for i in range(len(s)):
        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
print(count)