#include using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int n,b[61] = {}; unsigned long long tmp; cin >> n; vector< vector > m(n, vector(61, 0)); for (int i = 0; i < n; i++) { cin >> tmp; for(int j = 0; j < 62; j++) { m[i][j] = (tmp >> j) & 1; if (m[i][j]) b[j] = 1; } } int c = count(b, b + 62, 1); unsigned long long ans = 1LL << min(c, n); cout << ans << "\n"; return 0; }