#include #include #include using namespace atcoder; using mint = modint998244353; using namespace std; #define rep(i,n) for(int i=0;i<(n);i++) #define Inf 1000000001 int main(){ int n; cin>>n; vector> a(2); rep(i,n){ int aa; cin>>aa; a[__builtin_popcount(aa)%2].push_back(aa); } mf_graph G(n+2); int s = n,t = n+1; rep(i,a[0].size()){ rep(j,a[1].size()){ if(__builtin_popcount((a[0][i]^a[1][j]))==1)G.add_edge(i,a[0].size()+j,1); } } rep(i,a[0].size()){ G.add_edge(s,i,1); } rep(i,a[1].size()){ G.add_edge(a[0].size()+i,t,1); } int ans = n; ans -= G.flow(s,t); cout<