import itertools N,K = map(int, input().split()) A = list(map(int, input().split())) l = [i for i in range(1,N+1)] S = 0 S1 = 0 S2 = 0 ans = 0 for v in itertools.combinations(l,K): S = 0 for s in v: S += A[s-1] S1 = S % 998 S2 = S % 998244353 if S1 >= S2: ans += 1 print(ans % 998)