import java.util.Arrays; import java.util.Collections; import java.util.LinkedList; import java.util.PriorityQueue; import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); final int N = sc.nextInt(); PriorityQueue queue = new PriorityQueue(Collections.reverseOrder()); for(int i = 0; i < N; i++){ queue.add(sc.nextLong()); } while(!queue.isEmpty()){ final long value = queue.poll(); if(value == 0){ queue.add(value); break; }else{ final long min = Long.highestOneBit(value); while(!queue.isEmpty()){ final long next_value = queue.poll(); if((next_value & min) != 0){ queue.add(next_value ^ value); }else{ queue.add(next_value); break; } } } } final int rank = N - queue.size(); System.out.println(1l << rank); } }