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