{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
import qualified Data.ByteString.Char8 as B

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

solve :: B.ByteString -> Int
solve s = 2 * min c0 c1
  where
    c0 = B.count '0' s
    c1 = B.length s - c0
