s = map(int, input())

ans = 0
stack = [2]
for e in s:
    if stack[-1] ^ e == 1:
        stack.pop()
        ans += 2
    else:
        stack.append(e)

print(ans) s = map(int, input()) s map(int, input()) map int input() input ans = 0 ans 0 stack = [2] stack [2] 2 for e in s:
    if stack[-1] ^ e == 1:
        stack.pop()
        ans += 2
    else:
        stack.append(e) e s if stack[-1] ^ e == 1:
        stack.pop()
        ans += 2
    else:
        stack.append(e) stack[-1] ^ e == 1 stack[-1] ^ e stack[-1] stack -1 e 1 stack.pop() stack.pop stack pop ans += 2 ans 2 stack.append(e) stack.append stack append e print(ans) print ans s = map(int, input()) map(int, input()) s ans = 0 0 ans stack = [2] [2] stack ans += 2 2 ans
s = map(int, input())

ans = 0
stack = [2]
for e in s:
    if stack[-1] ^ e == 1:
        stack.pop()
        ans += 2
    else:
        stack.append(e)

print(ans)
