process.stdin.resume();
process.stdin.setEncoding('utf8');
 
var lines = [];
var reader = require('readline').createInterface({
    input: process.stdin,
    output: process.stdout
});
reader.on('line', (line) => {
    // ここで入力を処理する
    lines.push(line);
});
var half_ary = (ary)=>{
 // console.log(ary)
  var ct = 0;
  for(var i in ary){
    if((ary[i] % 2) != 0){
      ++ct
    }
      }
 // console.log(ct)
    if(ct == 0){
      var b = []
      for(var j in ary){
        b.push(1*ary[j]/2)
      }      
      return b
    }else{
      return false;
    }

}
reader.on('close', () => {
  var a = lines[1].split(" ");
  //console.log(a)
  var cnt = 0;
  var cnt_fn = (ary) =>{
    var c = half_ary(ary)
    if(c){
      ++cnt
      cnt_fn(c)
    }else{
      console.log(cnt)
    }
    
  }

    cnt_fn(a)
  

 // console.log(cnt)

//console.log(1*lines[0]+1*lines[1].split(' ')[0]+1*lines[1].split(' ')[1]+" "+lines[2])
});