#include using namespace std; #define REP(i, n) for(int(i)=0;(i)<(n);++(i)) const int MOD = int(1e9+7); bool f[32768]; int main(){ int N; cin >> N; f[0] = true; REP(i,N){ int a; cin >> a; REP(j,32768) if(f[j]) f[j^a] = true; } int res = 0; REP(j,32768) if(f[j]) res++; cout << res << endl; return 0; }