module Main where

import Control.Applicative

main :: IO ()
main = do
  s <- getLine
  let lenAll = length s
  let lenZero = length $ filter (=='0') s
  let lenOne = lenAll - lenZero
  print $ lenAll - abs (lenZero - lenOne)