'use strict'

const main = (INPUT) => {
  const S = INPUT.split('\n')[0].split('')
  let ans = 0

  for (let i = 0; i < S.length; i++) {
    if (S[i] == '1') {
      for (let j = i + 1; j < S.length; j++) {
        if (S[j] == '0') {
          ans += 2
          S[i] = '9'
          S[j] = '9'
        }
      }
    } else if (S[i] == '0') {
      for (let j = i + 1; j < S.length; j++) {
        if (S[j] == '1') {
          ans += 2
          S[i] = '9'
          S[j] = '9'
        }
      }
    }
  }
  console.log(ans)
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))
