from collections import deque N,M = map(int,input().split()) D = sorted([int(input()) for _ in range(M)]) que = deque(D[:N]) def dist(l,r): if l==r: return abs(l) if 0<=l