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

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