a = input()
a = str(a)
l = len(a)
blk = a
i = 0
rem = 0
while i < (l - 1):
    if(int(blk[i]) + int(blk[i+1]) == 1):
        blk = blk[:i] + blk[i+2:]
        l -= 2
        rem += 2
        i = 0
    else:
        i += 1
    
print(rem)