#include #define rep(i,a,b) for(ll i=ll(a);i> N; vector A(N); rep(i,0,N)cin >> A[i]; ll ans = 0; rep(i,0,32){ ll bit = 1 << i; rep(j,0,N){ bit &= A[j]; } ans += bit; } ll maxi = 0; rep(i,0,N)maxi = max(maxi, ans ^ A[i]); cout << maxi << endl; }