import itertools N, K = map(int, input().split()) A = list(map(int, input().split())) ans = 0 for cmb in itertools.combinations(A, K): if sum(cmb) % 998244353 <= sum(cmb) % 998: ans += 1 print(ans % 998)