import std.stdio;
import std.string;
import std.conv;
import std.algorithm;
import std.array;

int count2(int x) {
    int ret = 0;
    while (x % 2 == 0) {
        ++ret;
        x /= 2;
    }
    return ret;
}

void main() {
    size_t n;
    string s;
    readf("%d\n%s\n", n, s);
    auto c = s.split().map!(a => a.to!int.count2).reduce!min;
    writeln(c);
}
