public static void main(String []args){
        Scanner scan=new Scanner(System.in);
        String arr=scan.nextLine();
        int n=Integer.parseInt(arr);
        String sl=scan.nextLine();
        String[] st = sl.split(" ");
        Map<Integer,Integer> map=new HashMap<>();
        int result=0;
        int xor=0;
        for(int i=0;i<st.length;i++){
        	if(Integer.parseInt(st[i])==0){
        		result++;
        		xor=0;
        		map.clear();
        	}else{ 	
        		xor=xor^Integer.parseInt(st[i]);
        		if(xor==0){
        			result++;
        			xor=0;
        			map.clear();
        		}else if(map.size()!=1&&map.containsKey(xor)){
        			result++;
        			xor=0;
        			map.clear();
        		}else {
        			map.put(xor, 1);
        		}
        	}
        }
    	System.out.println(result);
    }      
#滴滴#