mod1 = 998 mod2 = 998244353 from itertools import combinations n, k = map(int, input().split()) a = list(map(int, input().split())) ans = 0 for c in combinations([i for i in range(n)], k): s = 0 for i in c: s += a[i] if s%mod2 <= s%mod1: ans += 1 ans %= mod1 print(ans%mod1)