import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); boolean[] dp = new boolean[1 << 14 + 1]; for (int i = 0; i < N; i++) { dp[sc.nextInt()] = true; } sc.close(); for (int i = 0; i < dp.length; i++) { if (!dp[i]) { continue; } for (int j = 0; j < dp.length; j++) { if (dp[j]) { dp[i ^ j] = true; } } } int ans = 0; for (int i = 0; i < dp.length; i++) { if (dp[i]) { ans++; } } System.out.println(ans); } }