#include char dp[3][32780]; int main(void){ int i,j,n; int cnt=0; scanf("%d", &n); dp[0][0] = 1; for(i=1;i<=n;i++){ int a; scanf("%d", &a); for(j=0;j<32780;j++){ int front = (i+1)%2; int now = i%2; if(dp[front][j] == 1){ int xor = a^j; dp[now][xor] = 1; dp[now][j] = 1; } } } for(i=0;i<32780;i++){ if(dp[n%2][i] == 1){ cnt++; } } printf("%d\n", cnt); return 0; }