count = 0

daruma = list(map(int, list(input())))

flag = len(daruma)

while flag != 0:
    try:
        for i in range(0, len(daruma)):
            if daruma[i] + daruma[i+1] == 1:
                daruma = daruma[:i]+daruma[i+2:]
                count +=2
        flag -= 1
    except:
        flag -= 1

print(count)
