# coding: utf-8
s = list(input())
c = 0
b = 100
flag = 1
while flag == 1:
    flag = 0
    for i, n in enumerate(s):
        if (b == "0" and n == "1") or (b == "1" and n == "0"):
            c += 2
            b = 2
            flag = 1
            break
        else:
            b = n
    if flag == 1:
        for j in range(2):
            del s[i-1]
print(c)