n=gets a=gets.split.map(&:to_f) if n%2==0 p (a[n/2]+a[n/2+1])/2 else p a[n/2] end