n, k = map(int, input().split()) p = [int(i) for i in input().split()] assert 1 <= n <= 172 assert 1 <= k <= 172 assert 0 <= min(p) and max(p) <= 400