[s] = [i for i in input().split()]
cnt = 0

while True:
    if "01" in s:
        s = s.replace("01", '', 1)
        cnt = cnt + 2
    elif "10" in s:
        s = s.replace("10", '', 1)
        cnt = cnt + 2
    else:
        break

print(cnt)
