from itertools import combinations N, K = map(int, input().split()) A = list(map(int, input().split())) m1 = 998 m2 = 998_244_353 ans = 0 for comb in combinations(A, K): sc = sum(comb) if sc % m1 >= sc % m2: ans += 1 print(ans % m1)