#include using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) using ll = long long; using vll = vector; using vi = vector; using vvi = vector>; using vvll = vector>; const ll inf = 1e16; const ll md = 1000000007; int bitlen(ll x){ int i=32; while (true){ if(x>>i&1) return i; i--; } } int main() { int n; cin >> n; vll a(n); rep(i,n) cin>>a[i]; ll mx=0LL; rep(i,n) mx=max(mx,a[i]); rep(i,n) a[i]=a[i]^mx; sort(a.begin(),a.end()); auto ei=unique(a.begin(),a.end()); n=ei-a.begin(); if(n==1){ puts("0"); return 0; } vector sep(n+1); sep[0]=true; sep[n]=true; int ti=bitlen(*(ei-1)); int ans=0; for(int i=ti;i>=0;i--){ ans+=1<>i&1; if(pre==0&&now){ sep[j]=true; if(sep[j-1]){ cout<