import sys
s = list(sys.stdin.readline())
l = len(s)
cnt = 0
ans = 0
while cnt < l-1:
    if int(s[cnt]) + int(s[cnt + 1]) == 1:
        del s[cnt:cnt + 2]
        cnt = 0
        ans += 2
        l = len(s)
    else:
        cnt += 1
print(ans)
