W = int(input()) N = int(input()) blo = sorted(list(map(int,input().split()))) dig=False s=0 for i in range(N): s+=int(i) if i+1