Module Module1
    Sub Main()
        Dim sInput1 As String()
        Dim sInput2 As String()
        sInput1 = Console.ReadLine().Split(" ")
        sInput2 = Console.ReadLine().Split(" ")
        Console.WriteLine((sInput2.Last()) - (sInput2(0)))
    End Sub

End Module
