#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; int main() { cin.tie(0); ios::sync_with_stdio(false); int N; const int maxSize = 1 << 15; int dp[maxSize] = {}; cin >> N; dp[0] = true; for (int i = 0; i < N; i++) { int a; cin >> a; dp[a] = true; for (int j = 0; j < maxSize; j++) { if (dp[j]) { dp[a ^ j] = true; } } } int ans = 0; for (int i = 0; i < maxSize; i++) { if (dp[i]) ans++; } cout << ans << endl; return 0; }