function main (input) {
    const args = input.split('\n');
    const n = args[0];
    const a = args[1].split(' ');
    var flg = true;
    var cnt = 0;
    while (flg) {
        for (var i=0;i<n;i++) {
            if (a[i]%2!=0 ) {
                flg = false;
            }
            a[i] = a[i]/2;
            cnt ++;
        }
    }
    console.log(cnt/n-1);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));