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