from itertools import combinations M = lambda:map(int,input().split()) N,K=M() A=list(M()) ans = 0 for i in combinations(range(N),K): sm = sum(A[j] for j in i) if sm % 998244353 <= sm % 998: ans += 1 print(ans%998)