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 random
  from bisect import bisect_left as lb
  from bisect import bisect_right as rb
  from collections import deque
  #sys.setrecursionlimit(10**8)
  from queue import PriorityQueue as pq
  from math import gcd
  #import math
  input_ = lambda: sys.stdin.readline().strip("\r\n")
  ii = lambda : int(input_())
  il = lambda : list(map(int, input_().split()))
  ilf = lambda : list(map(float, input_().split()))
  lii = lambda : list(map(int, list(ip())))
  ip = lambda : input_()
  fi = lambda : float(input_())
  ap = lambda ab,bc,cd : ab[bc].append(cd)
  li = lambda : list(input_())
  pr = lambda x : print(x)
  prinT = lambda x : print(x)
  f = lambda : sys.stdout.flush()
  inv =lambda x:pow(x,mod-2,mod)
  dx = [0,0,1,-1]
  dy = [1,-1,0,0]
  mod = 10**9 + 7
  mod1 = 998244353
  
  fact = [1]
  
  for i in range (1,10005) :
      fact.append((fact[-1]*i)%mod1)
  
  inv = [pow(fact[-1],mod1-2,mod1)]
  
  for i in range (10004,0,-1) :
      inv.append((inv[-1]*i)%mod1)
  
  inv.reverse()
  
  n,k = il()
  s = list(ip())
  
  if (k == 0) :
      print(1)
      exit(0)
  
  
  s = ['#'] + s
  
  pre = [0 for i in range (n+2)]
  suf = [0 for i in range (n+2)]
  ch = [[0,0] for i in range (n+1)]
  
  c = 0
  
  for i in range (1,n+1) :
      ch[i] = ch[i-1].copy()
  
      t = 0
      if (s[i] == '1') :
          t = 1
      
      ch[i][t] += 1
  
      if (s[i] == '0') :
          c += 1
      else :
          pre[i] = c
          c = 0
  
  
  
  if (k == 0 or ch[n][1] - ch[0][1] < k) :
      print(1)
      exit(0)
  
  c = 0
  for i in range (n,0,-1) :
      if (s[i] == '0') :
          c += 1
      else :
          suf[i] = c
          c = 0
  
  ans = 0
  
  for i in range (1,n+1) :
      if (s[i] == '0') :
          continue
  
      j = i
      c = 0
  
      while (j<=n and c < k) :
          if (s[j] == '1') :
              c += 1
          j += 1
  
      if (c < k) :
          break
  
      z = pre[i] + suf[j-1] + ch[j-1][0] - ch[i-1][0]
  
      ans += (fact[z + k]*inv[k] * inv[z])%mod1
      ans %= mod1
  
  ans1 = 0
  
  for i in range (1,n+1) :
      if (s[i] == '0') :
          continue
  
      j = i
      c = 0
  
      while (j <= n and c <= k) :
          if  (s[j] == '1') :
              c += 1
          j += 1
  
      if (c <= k) :
          break
  
      z = ch[j-1][0] - ch[i-1][0]
  
      ans1 += (fact[z + k -1]*inv[k-1]*inv[z])%mod1
      ans1 %= mod1
  
  ans = (ans + mod1 - ans1)%mod1
  print(ans)
  