lmod=998244353 smod=998 n,k=map(int, input().split()) A=tuple(map(int, input().split())) from itertools import combinations ans=0 for X in combinations(A,k): s=sum(X) if s%lmod<=s%smod: ans+=1 ans%=smod print(ans)