#include #include using namespace std; using ll = long long; int main(){ int n; cin >> n; vector a(n); for(auto &it: a) cin >> it; for(int i = 0; i < 62; i++){ bool isok = true; for(auto &it: a){ if((it >> i) & 1) isok = false; } if(isok){ cout << (1LL << i) << endl; return 0; } } return 0; }