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