# input
S = input()
N = len(S)

# check
cnt = 0
del_ind = []
append = del_ind.append

while N > 1:
    for i in range(1, N):
        if S[i - 1:i + 1] in ["01", "10"]:
            cnt += 2
            N -= 2
            S = S[:i - 1] + S[i + 1:]
            break
print(cnt)