import itertools n,k = map(int, input().split()) a = list(map(int, input().split())) s = list(itertools.combinations(a,k)) cnt = 0 for i in s: if sum(i) < 998: cnt += 1 print(cnt%998)