main = do
    s <- getLine
    let y = ans s
    print y
    
countzero :: String -> Int
countzero [] = 0
countzero (x:xs)
    | x == '0' = (countzero xs) + 1
    | otherwise = countzero xs
    
countone :: String -> Int
countone [] = 0
countone (x:xs)
    | x == '1' = (countone xs) + 1
    | otherwise = countone xs

ans :: String -> Int 
ans s = 2 * ( min (countzero s) (countone s) )
