import java.util.Scanner; public class Main { public static void main(String[] args) { int max = (int)Math.pow(2, 14); int []dp = new int[max]; Scanner scan = new Scanner(System.in); int N = scan.nextInt(); int []A = new int[N]; for(int i = 0; i < N; i++) { A[i] = scan.nextInt(); dp[A[i]] = 1; } scan.close(); for(int i = 0; i < N; i++) { for(int j = 0; j < max; j++) { if(dp[j] != 0) { dp[A[i] ^ j] = 1; } } } int cnt = 0; for(int i = 0; i< max; i++) { if(dp[i] != 0) { cnt++; } } System.out.println(cnt); } }