s = [int(i) for i in list(input())]
ans = 0

for _ in range(len(s) // 2):
    for i in range(len(s) - 1):
        try:
            if s[i] + s[i + 1] == 1:
                del s[i:i + 2]
                ans += 2
        except IndexError:
            break
print(ans)
