N=int(input()) X=[int(i) for i in input(). split ()] X.sort() M=X[N-1]-X[0] i=0 while i