s = list(input())
num = 0
i = 0
while "1" in s and "0" in s:
    if (s[i] == "0" and s[i + 1] == "1") or (s[i] == "1" and s[i + 1] == "0"):
        del s[i]
        del s[i]
        num += 2
        i = 0
    else:
        i += 1
print(num)
