import java.util.Arrays; import java.util.Scanner; public class Main_yukicoder183 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); boolean[][] dp = new boolean[2][16384 * 2 + 1]; dp[0][0] = true; for (int i = 1; i <= n; i++) { int a = sc.nextInt(); Arrays.fill(dp[i % 2], false); for (int j = 0; j <= 16384 * 2; j++) { if (dp[(i - 1) % 2][j]) { dp[i % 2][j] = true; dp[i % 2][j ^ a] = true; } } } int ret = 0; for (boolean f : dp[n % 2]) { if (f) { ret++; } } System.out.println(ret); sc.close(); } }