public static void main ( String args [ ] ) {
  long s = System . currentTimeMillis ( ) ;
  FastReader input = new FastReader ( ) ;
  PrintWriter out = new PrintWriter ( System . out ) ;
  int T = 1 ;
  while ( T -- > 0 ) {
    int n = input . nextInt ( ) ;
    int a [ ] = new int [ n ] ;
    int pre [ ] = new int [ n ] ;
    for ( int i = 0 ;
    i < n ;
    i ++ ) {
      a [ i ] = input . nextInt ( ) ;
      if ( i == 0 ) {
        pre [ i ] = a [ i ] ;
      }
      else {
        pre [ i ] = a [ i ] ^ pre [ i - 1 ] ;
      }
    }
    long xor [ ] [ ] = new long [ 2 ] [ 2000000 ] ;
    xor [ 1 ] [ 0 ] ++ ;
    long ans = 0 ;
    for ( int i = 0 ;
    i < n ;
    i ++ ) {
      ans += xor [ i % 2 ] [ pre [ i ] ] ;
      xor [ i % 2 ] [ pre [ i ] ] ++ ;
    }
    out . println ( ans ) ;
  }
  out . close ( ) ;
}

public static void main ( String args [ ] ) { long s = System . currentTimeMillis ( ) ; FastReader input = new FastReader ( ) ; PrintWriter out = new PrintWriter ( System . out ) ; int T = 1 ; while ( T -- > 0 ) { int n = input . nextInt ( ) ; int a [ ] = new int [ n ] ; int pre [ ] = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = input . nextInt ( ) ; if ( i == 0 ) { pre [ i ] = a [ i ] ; } else { pre [ i ] = a [ i ] ^ pre [ i - 1 ] ; } } long xor [ ] [ ] = new long [ 2 ] [ 2000000 ] ; xor [ 1 ] [ 0 ] ++ ; long ans = 0 ; for ( int i = 0 ; i < n ; i ++ ) { ans += xor [ i % 2 ] [ pre [ i ] ] ; xor [ i % 2 ] [ pre [ i ] ] ++ ; } out . println ( ans ) ; } out . close ( ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier) dimensions: (dimensions))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (update_expression (identifier)) right: (decimal_integer_literal))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) dimensions: (dimensions) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (identifier))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) dimensions: (dimensions) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (identifier))))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (identifier))))) alternative: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal)))))))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) dimensions: (dimensions) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (decimal_integer_literal)) dimensions: (dimensions_expr (decimal_integer_literal))))) (expression_statement (update_expression (array_access array: (array_access array: (identifier) index: (decimal_integer_literal)) index: (decimal_integer_literal)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (identifier) right: (array_access array: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) index: (array_access array: (identifier) index: (identifier))))) (expression_statement (update_expression (array_access array: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) index: (array_access array: (identifier) index: (identifier))))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))