s = str(input())
ans = 0 

for st in ['01', '10']:
    while st in s:
        for i in range(len(s)):
            if s[i:i+2] == st:
                if i > 0 and i + 2 < len(s):
                    s = s[:i] + s[i+2:]
                elif i == 0:
                    s = s[i+2:]
                elif i + 2 == len(s):
                    s = s[:i]
                ans += 2

print(ans)
