#include using namespace std; typedef long long ll; #define rep(i,n) for(i=0;i>n; std::vector a(n); rep(i,n) cin >>a[i]; const int N=40000; bool dp[N]; rep(i,N) dp[i]=false; dp[0]=true; rep(i,n){ rep(j,N){ if(dp[j]) dp[j^a[i]]=true; } } int ans=0; rep(j,N) if(dp[j]) ++ans; std::cout << ans << std::endl; return 0; }