#include using namespace std; typedef long long ll; int main() { int n; cin >> n; ll a[102]; for(int i = 0; i < n; i++) cin >> a[i]; for(int j = 0; j <= 60; j++){ bool f = true; for(int i = 0; i < n; i++) f &= !((a[i] >> j) & 1); if(f){ cout << (1ll << j) << endl; return 0; } } }