#include using namespace std; int main() { int n, a[5000]; cin >> n; for (int i = 0;i < n;i++) { cin >> a[i]; } bool dp[32768] = { false }; dp[0] = true; for (int i = 0;i < n;i++) { for (int j = 0;j < 32768;j++) { dp[j^a[i]] |= dp[j]; } } int count = 0; for (int i = 0;i < 32768;i++) { if (dp[i]) { count++; } } cout << count << endl; return 0; }