a=str(input())
count=0
while 1:
    before=a
    if "01" in a:
        a=a.replace("01","",1)
        count+=2
    if "10" in a:
        a=a.replace("10","",1)
        count+=2
    after=a
    if before==after:
        break
print(count)
