# comb(28,8) ~ 3.1*10**6 # これを全探索でギリ<10**8 from itertools import combinations N,K = map(int, input().split()) A = list(map(int, input().split())) ans = 0 for c in combinations(list(range(N)),K): S = 0 for e in c: S += A[e] if S % 998244353 <= S % 998: ans += 1 print(ans % 998)