from itertools import combinations N, K = map(int, input().split()) A = list(map(int, input().split())) ans = 0 for cs in combinations(A, K): s = sum(cs) if s % 998244353 <= s % 998: ans += 1 print(ans % 998)