n = (gets.to_i)/2.to_i ai = gets.split.map{|a| a.to_i} if n%2==0 then puts((ai[n]+ai[n+1])/2) else puts(ai[n]) end