from itertools import combinations n, k = map(int, input().split()) a = list(map(int, input().split())) ans = 0 for p in combinations(a, k): if sum(p) % 998244353 <= sum(p) % 998: ans += 1 print(ans % 998)