import itertools n, k = map(int, input().split()) A = list(map(int, input().split())) ans = [] for i in itertools.combinations(A, k): t = sum(list(i)) a = t % 998 b = t % 998244353 if a >= b: ans.append(1) print(sum(ans) % 998)