description: You are given a binary string (i. e. a string consisting of characters 0 and/or 1) s of length n. You can perform the following operation with the string s at most once: choose a substring (a contiguous subsequence) of s having exactly k characters 1 in it, and shuffle it (reorder the characters in the substring as you wish).
  
  Calculate the number of different strings which can be obtained from s by performing this operation at most once.
  
  Input
  
  The first line contains two integers n and k (2 ≤ n ≤ 5000; 0 ≤ k ≤ n).
  
  The second line contains the string s of length n, consisting of characters 0 and/or 1.
  
  Output
  
  Print one integer — the number of different strings which can be obtained from s by performing the described operation at most once. Since the answer can be large, output it modulo 998244353.
  
  Examples
  
  Input
  
  
  7 2
  1100110
  
  
  Output
  
  
  16
  
  
  Input
  
  
  5 0
  10010
  
  
  Output
  
  
  1
  
  
  Input
  
  
  8 1
  10001000
  
  
  Output
  
  
  10
  
  
  Input
  
  
  10 8
  0010011000
  
  
  Output
  
  
  1
  
  Note
  
  Some strings you can obtain in the first example:
  
    * to obtain 0110110, you can take the substring from the 1-st character to the 4-th character, which is 1100, and reorder its characters to get 0110; 
    * to obtain 1111000, you can take the substring from the 3-rd character to the 7-th character, which is 00110, and reorder its characters to get 11000; 
    * to obtain 1100101, you can take the substring from the 5-th character to the 7-th character, which is 110, and reorder its characters to get 101. 
  
  
  
  In the second example, k = 0 so you can only choose the substrings consisting only of 0 characters. Reordering them doesn't change the string at all, so the only string you can obtain is 10010.
solution: # cook your dish here
  import sys
  import bisect
  from bisect import bisect_left as lb
  from bisect import bisect_right as rb
  input_=lambda: sys.stdin.readline().strip("\r\n")
  from math import log
  from math import gcd
  from math import atan2,acos
  from random import randint
  sa=lambda :input_()
  sb=lambda:int(input_())
  sc=lambda:input_().split()
  sd=lambda:list(map(int,input_().split()))
  sflo=lambda:list(map(float,input_().split()))
  se=lambda:float(input_())
  sf=lambda:list(input_())
  flsh=lambda: sys.stdout.flush()
  sys.setrecursionlimit(3*10**5)
  mod=10**9+7
  mod1=998244353
  gp=[]
  cost=[]
  dp=[]
  mx=[]
  ans1=[]
  ans2=[]
  special=[]
  specnode=[]
  a=0
  kthpar=[]
  def dfs2(root,par):
      if par!=-1:
          dp[root]=dp[par]+1
      for i in range(1,20):
          if kthpar[root][i-1]!=-1:
              kthpar[root][i]=kthpar[kthpar[root][i-1]][i-1]
      for child in gp[root]:
          if child==par:continue
          kthpar[child][0]=root
          dfs(child,root)
          
  ans=0
  a=[]
  n,k=0,0
  b=[]
  vis=[]
  tot=0
  time=[]
  time1=[]
  adj=[]
  mx=-1
  eps=0.0000001
  fact=[0]*(6010)
  inv=[0]*(6010)
  fact[0]=1
  fact[1]=1
  inv[0]=1
  inv[1]=1
  for i in range(2,6002):
      fact[i]=(fact[i-1]*i)%mod1
      inv[i]=pow(fact[i],mod1-2,mod1)
  def ncr(n,r):
      if r==0 or n==0:
          return 1
      ans=fact[n]*inv[r]*inv[n-r]
      ans%=mod1
      return ans
  def hnbhai(tc):
      ##O(n) done 
      n,k=sd()
      s="s"+sa()
      prefix=[0]*(n+1)
      suffix=[0]*(n+1)
      dp=[[0,0] for i in range(n+1)]
      tot=0
      pos=[]
      for i in range(1,n+1):
          dp[i]=dp[i-1].copy()
          dp[i][int(s[i])]+=1
          if int(s[i])==0: tot+=1
          else:
              pos.append(i)
              prefix[i]=tot
              tot=0
      if k==0 or dp[n][1]-dp[0][1]<k:
          print(1)
          return
      temp=0
      for i in range(n,0,-1):
          if int(s[i])==0:temp+=1
          else:
              suffix[i]=temp
              temp=0
      tot=0
      ans=0
      l,r=100000,-1
      for i in range(len(pos)):
          if i+k==len(pos):
              temp=prefix[pos[i]]+n-pos[i]+1
              ans+=ncr(temp,k)
              ans%=mod1
              break
          temp=prefix[pos[i]]+pos[i+k]-pos[i]
          ans+=ncr(temp,k)
          ans-=ncr(temp-1-prefix[pos[i]],k-1)
          ans%=mod1
      print(ans)
      return
  for _ in range(1):
      hnbhai(_+1)
  #
  