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