n,k=map(int,input().split()) a=list(map(int,input().split())) from itertools import combinations c=0 for p in combinations(list(range(n)),k): s=sum(a[i] for i in p) c+=(s%998244353)<=(s%998) print(c%998)