#!/usr/bin/env python # -*- coding: utf-8 -*- N = int(input()) dp = dict() A = list(map(int,input().split())) dp[0] = True for a in A: tmp = dict() for i,value in dp.items(): if i ^ a not in dp: tmp[i^a] = True dp.update(tmp) print(len(dp.keys()))