import itertools a,b=map(int,input().split()) c=list(map(int,input().split())) ans=0 for blueberry in itertools.combinations(c,b): if sum(blueberry)%998244353<=sum(blueberry)%998: ans+=1 print(ans%998)