
in_num = str(input())
digit_num = len(in_num)
box = []
ans = 0
k = 0
r = 0
for i in range(digit_num):
    box.append(in_num[i])
def func(box, ans, r):
    for j in range(len(box)-1):
        if (int(box[j]) == 0 and int(box[j+1]) == 1)or(int(box[j]) == 1 and int(box[j+1]) == 0):
            if len(box) == 2:
                ans += 2
                r = 1
                break
            box.pop(j)
            box.pop(j+1)
            ans += 2
            break
        else:
            continue
    return box, ans, r

i = 0

for i in range(digit_num):
    if len(box) == 0:
        break

    box, ans, r = func(box, ans, r)
    if r == 1:
        break
    
print(ans)