L = int(input()) N = int(input()) wide = list(map(int, input().split())) wide.sort() i = 0 sum = 0 while i