main :: IO ()
main = do
    s <- getLine
    print $ solve s

solve :: String -> Int
solve s =
    let n    = length s
        zero = length . filter (\c -> c == '0') $ s
    in  2 * (min zero $ n - zero)
