object Main extends App {
  val in = scala.io.Source.stdin.getLines.toSeq
  val ls = in.head //in.map(_.split(' ').map(_.toInt).toIndexedSeq).head
  val S = ls
  //println(S)
  val c0 = S.count(_ == '0')
  val c1 = S.size - c0
  val ret = Math.min(c0, c1) * 2
  println(ret)
}
