function main(input) {
	var input = input.split('\n')[1];
  	var counter = 0;
	for (var i = 0; i < input.length; i++) {
		if(input[i] % 2 === 0) {
			input[i] /= 2;
        }else{
          	break;
        }
      counter++;
    }
  console.log(counter);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));