import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.HashSet; import java.util.Set; public class No183 { public static void main(String[] args) { try { BufferedReader br = new BufferedReader(new InputStreamReader( System.in)); int N = Integer.parseInt(br.readLine()); String[] Aarray = br.readLine().split(" "); int[] Ai = new int[N]; for (int i = 0; i < N; i++) { Ai[i] = Integer.parseInt(Aarray[i]); } Set set = new HashSet(); knapsack(Ai, 0, set, 0); System.out.println(set.size()); } catch (Exception e) { System.err.println("Error:" + e.getMessage()); } } static void knapsack(int[] Ai, long XORSum, Set set, int n) { if (n == Ai.length) { return; } set.add(XORSum); knapsack(Ai, XORSum ^ Ai[n], set, n + 1); knapsack(Ai, XORSum, set, n + 1); } }