using System.Collections.Generic; using System; using System.Linq; using System.Drawing; namespace yukicoder { class Program { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); int K = int.Parse(Console.ReadLine()); string[] strings = new string[N]; float[] ints = new float[N]; for (int i = 0; i < N; i++) { strings[i] = Console.ReadLine(); } Array.Sort(strings); for(int j = 0; j < strings.Length; j++) { ints[j] = float.Parse(strings[j]); } var hiave = ints[N - 1] / 1; var lowave = ints[0] / 1; var ans = Math.Ceiling(hiave - lowave); Console.WriteLine(ans); } } }