import java.util.*; import java.io.*; public class Main { static HashSet[] graph; static int n; public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); String[] line = br.readLine().split(" ", n); HashSet set = new HashSet<>(); set.add(0); for (int i = 0; i < n; i++) { int a = Integer.parseInt(line[i]); HashSet tmp = new HashSet<>(); for (int x : set) { tmp.add(x ^ a); } set.addAll(tmp); } System.out.print(set.size()); } }