#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define loop(i,a,b) for(int i=a;i pii; typedef vector vi; typedef vector vvi; typedef vector vp; typedef vector vvp; typedef vector vs; typedef vector vd; typedef tuple tp; typedef vector vt; typedef vector vvd; typedef pair pip; typedef vectorvip; const double PI=acos(-1); const double EPS=1e-7; const int inf=1e9; const ll INF=1e16; int dx[4]={0,1,0,-1}; int dy[4]={1,0,-1,0}; int main(){ int n; cin>>n; vi dp(34000); dp[0]=1; while(n--){ int a;cin>>a; rep(i,34000)if(dp[i]&&(i^a)<34000)dp[i^a]=1; } int out=0; rep(i,34000)out+=dp[i]; cout<