s=list(map(int,input()))
an=0
i=0

if len(s) < 2:
    print("0")
    exit()

while 1:
    if s[i]+s[i+1]==1:
        an+=2
        del s[i:i+2]
        i=0
    else:
        i+=1
    if i+1 == len(s) or len(s)==0:
        print(an)
        exit()