import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); HashSet set = new HashSet<>(); set.add(0); for (int i = 0; i < n; i++) { HashSet tmp = new HashSet<>(); int x = sc.nextInt(); for (int y : set) { tmp.add(x ^ y); } set.addAll(tmp); } System.out.println(set.size()); } }