function main(input) {
  const args = input.split(' ');
  const resultArray;
  for(var i=1; i=args.length-1; i++){
    var temp=0
    if(args[i]%2==0){
      temp++=1;
    }else{
      resultArray[i-1]=temp;
    }
  }
  console.log(Math.min.apply(null, resultArray));
}

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