from itertools import combinations N, K = map(int, input().split()) A = [int(i) for i in input().split()] ans = 0 for c in combinations(range(N), K): total = 0 for i in c: total += A[i] if total%998244353 <= total%998: ans += 1 print(ans%998)