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

function remove(obj) {
  for (var i = 0; i < obj.arr.length; i++) {
    if (Number(arr[i]) + Number(arr[i + 1]) === 1) {
      arr.splice(i, 1);
      return remove({ arr: obj.arr, removeCount: obj.removeCount + 2 });
    }
    return obj;
  }
}

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