import scala.io.StdIn
import scala.math.min

object Main {

  def main(args: Array[String]): Unit = {

    val s: List[Int] = StdIn.readLine().toList.map(_.asDigit)
    val cnt: Tuple2[Int, Int] = s.foldLeft((0, 0))((acc, c) =>
      if (c == 0) {
        (acc._1 + 1, acc._2)
      } else {
        (acc._1, acc._2 + 1)
      })
    val ans = min(cnt._1, cnt._2) * 2
    println(ans)

  }

}
