n,k=map(int,input().split()) xlist=list(map(int,input().split())) i=0 while True: if n<=i+1: break elif abs(xlist[i+1]-xlist[i])