# combinationsで組み合わせを列挙 from itertools import combinations def main(): N,K = map(int,input().split()) assert 1 <= N <= 28 assert 1 <= K <= min(8,N) A = list(map(int,input().split())) for a in A: assert 0 <= a <= 998244352 ans = 0 for comb in combinations(A,K): sum_comb = sum(comb) if sum_comb % 998244353 <= sum_comb % 998: ans += 1 print(ans % 998) if __name__ == "__main__": main()