from itertools import combinations N,K = map(int,input().split()) li = list(combinations(range(N),K)) A = list(map(int,input().split())) ans = 0 for v in li: S = 0 for u in v: S += A[u] if S%998 >= S%998244353: ans += 1 ; ans %= 998 print(ans)