from itertools import combinations N,K=map(int,input().split()) A=list(map(int,input().split())) L=[_ for _ in range(N)] C=combinations(L,K) ans=0 for c in C: s=0 for i in range(K): s+=A[c[i]] if(s%998244353<=s%998): ans+=1 print(ans%998)