from itertools import combinations N, K = map(int, input().split()) A = list(map(int, input().split())) M1 = 998 M2 = 998244353 ans = 0 for chosen in combinations(A, K): tmp1 = 0 tmp2 = 0 for a in chosen: tmp1 += a tmp1 %= M1 tmp2 += a tmp2 %= M2 if tmp1 >= tmp2: ans += 1 ans %= M1 print(ans)