#include<bits/stdc++.h>
using namespace std;

long long n;


int main ()
{
    cin>>n;

    long long curr=0;

    for (long long i=0; i<n; i++)
    {
        long long x;
        cin>>x;

        curr=(curr|x);
    }

    long long br=0;
    long long tek=1;
    for (long long i=0; i<20; i++)
    {
        if (curr&tek) br++;
        tek*=2;
    }
    cout<<br<<endl;
}
