#include #define MOD 666013 using namespace std; inline void debugMode() { #ifndef ONLINE_JUDGE freopen("debug.in", "r", stdin); #endif // ONLINE_JUDGE } vector < int > V; int S[64]; int main() { ios :: sync_with_stdio(false); debugMode(); int n,x,m = 0,p,ok; cin >> n; for(int i = 1; i <= n; i++){ cin >> x; V.push_back(x); } sort(V.begin(),V.end()); for(auto const &it : V){ x = it; p = 0; ok = 0; while(x){ if(S[p] == 0 && x % 2 == 1){ ok = 1; S[p] = 1; } x /= 2; p++; } if(ok == 0) m++; } cout << n - m; return 0; }