from itertools import combinations _, K = map(int, input().split()) A = tuple(map(int, input().split())) cnt = 0 for x in combinations(A, K): S = sum(x) if S % 998244353 <= S % 998: cnt += 1 print(cnt % 998)