class Input_kyopro:
    def II(self): return int(input())
    def MI(self): return map(int,input().split())
    def MS(self): return map(str,input().split())
    def LMI(self): return list(self.MI())
    def LMS(self): return list(self.MS())
    def LLI(self,N): return [self.LMI() for _ in range(N)]
    def LLS(self,N): return [self.LMS() for _ in range(N)]
    def LS(self,N): return [input() for _ in range(N)]
    def LSL(self,N): return [list(input()) for _ in range(N)]
    def LI(self,N): return [self.II() for _ in range(N)]
I=Input_kyopro()
#入力
import math
from itertools import combinations
Mod=998
N,K=I.MI()
A=I.LMI()
ans=0
for p in combinations(range(N),K):
    S=0
    for k in p:
        S+=A[k]
    if S%998244353 <= S%998:
        ans+=1
print(ans%998)