s = [int(i) for i in list(input())]
ans, cnt = 0, 0

for _ in range(len(s) // 2):
    for i in range(len(s) - 1):
        try:
            if s[i] + s[i + 1] == 1:
                del s[i:i + 2]
                cnt += 2
        except IndexError:
            break
    if ans == cnt:
        break
    else:
        ans = cnt

print(ans)
