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