public class compiler
  Shared Sub Main()
    Dim n As Integer = CType(Console.ReadLine(), Integer)
    Dim input As String = Console.ReadLine()
    Dim d(0 To n - 1) As Integer 
    For i As Integer = 0 To n - 1
        d(i) = CType(input.split(" ")(i), Integer)
    Next
    Array.Sort(Of Integer)(d)
    Dim output As Integer = d(n / 2) - d(n / 2 - 1)
    Console.WriteLine(output.ToString())
  End Sub
end class
