using System; using System.Collections.Generic; using System.IO; using System.Linq; class Solution { static void Main(String[] args) { int n = Convert.ToInt32(Console.ReadLine()); string[] a_temp = Console.ReadLine().Split(' '); int[] a = Array.ConvertAll(a_temp,Int32.Parse); int max=0; foreach(var v in a){ int uc = 0; int u = v+1; int lc = 0; int l = v-1; foreach(var vv in a){ if(vv>v){ if(vv<=u) uc++; }else if(vv=l) lc++; }else{ uc++; lc++; } } if(max