include Math N = gets.to_i A = gets.split().map(&:to_i) dp = A.dup d = 0 while dp.max > 0 m = dp.max dp.each_with_index do |a, i| if a > 0 and log2(a).floor == log2(m).floor dp[i] ^= m end end d += 1 end ans = 2**d puts ans