class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int[] sizeList = new int[n]; int maxsize = 0; int count = 0; for(int i = 0; i < n; i++) { sizeList[i] = int.Parse(Console.ReadLine()); } Array.Sort(sizeList); bool flg = false; for(int i = 0; i < n-1; i++) { if (sizeList[i + 1] - sizeList[i] > 2) { continue; } flg = true; } if (flg) { Console.WriteLine("2"); } else { Console.WriteLine("1"); } } }