function main(input) {
  ('use strict');
  const args = input.split('').map((v) => Number(v));
  var result = remove({ arr: args, removeCount: 0 });
  console.log(result.removeCount);
}

function remove(obj) {
  for (var i = 0; i < obj.arr.length; i++) {
    if (obj.arr[i] + obj.arr[i + 1] === 1) {
      obj.arr.splice(i, 2);
      obj.removeCount += 2;
      remove(obj);
      break;
    }
  }
  return obj;
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
