'use strict'

function Main(input) {
  let S = input.split("")
  let ans = 0
  let flag = false

  while(!flag && S.length >= 2) {
    for(let i=0; i<S.length-1; i++) {
      if((S[i] === "0" && S[i+1] === "1") || (S[i] === "1" && S[i+1] === "0")) {
        ans += 2
        if (i === 0) {
          S = S.slice(2)
        } else  {
          S = S.slice(0, i).concat(S.slice(i+2))
        }
        break
      }
      if(i === S.length - 2) {
        flag = true
        break
      }
    }
    
  }
  console.log(ans)
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim())
