S = input()
n=0
while True:
    f = S.find("01")
    if f != -1:
        S = S[:f]+S[f+2:]
        n += 1
    ff = S.find("10")
    if ff != -1:
        S = S[:ff]+S[ff+2:]
        n += 1

    if f==-1 and ff==-1:
        break
print(n*2)
