object Main extends App{
  val sc = new java.util.Scanner(System.in)
  val inputstring = sc.next
  val inputlist = List.tabulate(inputstring.size)(x=>{inputstring(x).toInt - 48})
  val count = inputlist.sum
  val ans = List(count,inputlist.size - count).min * 2
  println(ans)
}
