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