require 'Set' N = gets.to_i A = gets.split().map(&:to_i) dp = Set[0] A.each do |a| if a < 2**14 dp += Set.new(dp) {|x| x ^ a} end end ans = if A.include?(2**14) 2 * dp.size else dp.size end puts ans