import std.stdio;
import core.stdc.stdio;
import std.algorithm.comparison;

int f(int x, int cnt) {
    return (x % 2 == 1 ? cnt : f(x / 2, cnt + 1));
}

void main() {
    int n;
    scanf("%d", &n);
    int ans = 1 << 30;
    foreach(i; 0..n) {
        int x;
        scanf("%d", &x);
        ans = min(ans, f(x, 0));
    }
    writeln(ans);
}