LX = []
for j in input():
    LX.append(int(j))

chk = 1
cnt = 0
while(chk == 1 and len(LX) > 1):
    chk = 0
    for i in range(0, max(1,len(LX)-2)):
        if (LX[i] + LX[i+1] == 1):
            chk = 1
            LX.pop(i)
            LX.pop(i)
            cnt += 1
            break
print(2 * cnt)