import java.util.*; public class Exercise114{ public static void main (String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); boolean[] dp = new boolean[1 << 15]; dp[0] = true; for(int i = 0; i < n; i++){ int a = sc.nextInt(); for(int j = 0; j < dp.length; j++){ if(!dp[j]){ continue; } dp[a ^ j] = true; } } int answer = 0; for(int i = 0; i < dp.length; i++){ if(dp[i]){ answer++; } } System.out.println(answer); } }