S = input()
# 0 のとき赤色、1 のとき青色
stack=[]
for s in S:
    stack.append(s)
# print(stack)
cnt=0 #消せた数
while "1" in stack and "0" in stack:
    for i in range(len(stack)-1):
        # print(stack)
        # print(i)
        if stack[i] != stack[i+1]:
            if len(stack) >= 2:
                stack.pop(i)
                stack.pop(i)
                cnt += 2
                break
            # else:
            #     stack.pop(i)
            #     cnt += 2
            #     break
print(cnt)
