def INT(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(map(int, input().split())) from itertools import combinations N, K = MI() A = LI() nums = list(range(N)) cnt = 0 for c in combinations(nums, K): S = 0 for xk in list(c): S += A[xk] S_998 = S % 998 S_998244353 = S % 998244353 if S_998244353 <= S_998: cnt += 1 cnt %= 998 print(cnt)