s = input()

ans = 0
while True:
    for i in range(len(s)-1):
        if s[i:i+2] == "01" or s[i:i+2] == "10":
            s = s[:i] + s[i+2:]
            ans += 2

    if s.count("1") == 0 or s.count("0") == 0:
        break

print(ans)
