from itertools import combinations N,K=map(int,input().split()) A=list(map(int,input().split())) L=list(combinations(range(N),K)) ANS=0 for i in L: score=0 for j in i: score+=A[j] if score%998>=score%998244353: ANS+=1 print(ANS%998)