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