import scala.io.{StdIn => in}

object Main extends App {
  val s = in.readLine.map(ch => if(ch=='0') false else true).toList
  val n0 = s.count(_==false)
  val n1 = s.count(_==true)
  val ans = s.size - (n1 - n0).abs
  println(ans)
}