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): s = sum(comb) if s % M1 >= s % M2: ans += 1 if ans == M1: ans = 0 print(ans % M1)