#include #include #include #include #include #include #include #include #include #include #include #include #include #define p(s) cout<<(s)<=n;i--) #define CK(n,a,b) ((a)<=(n)&&(n)<(b)) #define F first #define S second typedef long long ll; using namespace std; int N; int ans; bool dp[1<<15]; int main(){ cin>>N; dp[0]=true; REP(i,0,N){ int a; cin>>a; REP(j,0,1<<15){ dp[a^j] |= dp[j]; } } REP(j,0,1<<15){ if(dp[j]) ans++; } p(ans); return 0; }