S = list(input())

end_flg = False
ans = 0

while not end_flg:
    for i in range(len(S)-1):
        if i == len(S)-2:
            end_flg = True
            break
        if (S[i] == '1' and S[i+1] == '0') or (S[i] == '0' and S[i+1] == '1'):
            ans += 2
            S.pop(i)
            S.pop(i)
            break

print(ans)