S = input()

ans = 0
pre = ''

while True:
    flag = 1
    for i, c in enumerate(S):
        if pre == '':
            pre = c
            continue

        if (pre == '1' and c == '0') or (pre == '0' and c == '1'):
            if i + 1 != len(S):
                S = S[:i - 1] + S[i + 1:]
            else:
                S = S[:i - 1]
            ans += 2
            flag = 0
            break
        pre = c
    if flag:
        break
print(ans)
