#include using namespace std; const int MAX = 1 << 15; int dp[MAX]; int main() { ios::sync_with_stdio(false); int n, t; cin >> n; dp[0] = true; for (int i = 0; i < n; i++) { cin >> t; for (int j = 0; j < MAX; j++) if(dp[j]) dp[t ^ j] = true; } int ans = 0; for (int i = 0; i < MAX; i++) if(dp[i]) ans++; cout << ans << endl; return 0; }