import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[] a = new int[N]; for(int i = 0; i < N; i++) { a[i] = sc.nextInt(); } int[][] dp = new int[N][(int)Math.pow(2, 14)]; dp[0][0] = 1; dp[0][a[0]] = 1; for(int i = 1; i < N; i++) { for(int j = 0; j < (int)Math.pow(2, 14); j++) { if(dp[i - 1][j] == 1 || dp[i - 1][j ^ a[i]] == 1) dp[i][j] = 1; } } int ans = 0; for(int j = 0; j < (int)Math.pow(2, 14); j++) { if(dp[N - 1][j] > 0) ans++; } System.out.println(ans); } }