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