S = input().rstrip()
found = True
cnt = 0
while(found):
    if S == '01' or S == '10':
        cnt += 2
        break
    for i in range(len(S) - 2):
        if S[i:i+2] == '01' or S[i:i+2] == '10':
            S = S[:i] + S[i+2:]
            cnt += 2
            found = True
            break
    else:
        found = False
print(cnt)     