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: import java.io.*;
  import java.util.*;
  
  public class B {
      //--------------------------INPUT READER---------------------------------//
      static class fs {
          public BufferedReader br;
          StringTokenizer st = new StringTokenizer("");
  
          public fs() { this(System.in); }
          public fs(InputStream is) {
              br = new BufferedReader(new InputStreamReader(is));
          }
          String next() {
              while (!st.hasMoreTokens()) {
                  try { st = new StringTokenizer(br.readLine()); }
                  catch (IOException e) { e.printStackTrace(); }
              }
              return st.nextToken();
          }
  
          int ni() { return Integer.parseInt(next()); }
          long nl() { return Long.parseLong(next()); }
          double nd() { return Double.parseDouble(next()); }
          String ns() { return next(); }
  
          int[] na(long nn) {
              int n = (int) nn;
              int[] a = new int[n];
              for (int i = 0; i < n; i++) a[i] = ni();
              return a;
          }
  
          long[] nal(long nn) {
              int n = (int) nn;
              long[] l = new long[n];
              for(int i = 0; i < n; i++) l[i] = nl();
              return l;
          }
      }
      //-----------------------------------------------------------------------//
  
      //---------------------------PRINTER-------------------------------------//
      static class Printer {
          static PrintWriter w;
          public Printer() {this(System.out);}
          public Printer(OutputStream os) {
              w = new PrintWriter(os);
          }
          public void p(int i) {w.println(i);}
          public void p(long l) {w.println(l);}
          public void p(double d) {w.println(d);}
          public void p(String s) { w.println(s);}
          public void pr(int i) {w.print(i);}
          public void pr(long l) {w.print(l);}
          public void pr(double d) {w.print(d);}
          public void pr(String s) { w.print(s);}
          public void pl() {w.println();}
          public void close() {w.close();}
      }
      //-----------------------------------------------------------------------//
  
      //--------------------------VARIABLES------------------------------------//
      static fs sc = new fs();
      static OutputStream outputStream = System.out;
      static Printer w = new Printer(outputStream);
      static long lma = Long.MAX_VALUE, lmi = Long.MIN_VALUE;
      static int ima = Integer.MAX_VALUE, imi = Integer.MIN_VALUE;
      static long mod = 998244353;
      //-----------------------------------------------------------------------//
  
      //--------------------------ADMIN_MODE-----------------------------------//
      private static void ADMIN_MODE() throws IOException {
          if (System.getProperty("ONLINE_JUDGE") == null) {
              w = new Printer(new FileOutputStream("output.txt"));
              sc = new fs(new FileInputStream("input.txt"));
          }
      }
      //-----------------------------------------------------------------------//
      //----------------------------START--------------------------------------//
      public static void main(String[] args)
              throws IOException {
  
          ADMIN_MODE();
  
  //        int t = sc.ni();while(t-->0)
              solve();
  
  
          w.close();
      }
  
      static void solve() throws IOException {
          int n = sc.ni();
          int k = sc.ni();
          char[] strr = sc.ns().toCharArray();
  
          long ans = 0;
          int l = 0;
          int curr = 0;
          int prev = -1;
          int[] pre = new int[n];
          pre[0] = strr[0]=='0'?0:1;
          for(int i = 1; i < n; i++) {
              pre[i]=pre[i-1]+(strr[i]=='1'?1:0);
          }
  
          if(pre[n-1] < k) {
              w.p(1);
              return;
          }
  
          for(int r = 0; r < n; r++) {
              if(strr[r]=='1') curr++;
  
              while(curr > k && r > l) {
                  if(strr[l]=='1') curr--;
                  l++;
              }
  
              if(curr == k) {
                  int len = r-l+1;
                  int twos = len-curr;
                  ans += ncr(fact[len], (fact[curr]*fact[twos])%mod);
                  ans %= mod;
                  if(prev >= l) {
                      len = prev-l+1;
                      twos = len-(pre[prev]-((l<=0)?0:pre[l-1]));
                      ans = (ans - ncr(fact[len], (fact[len-twos]*fact[twos])%mod) + mod) %mod;
                  } else if (prev != -1) {
                      ans = (ans-1+mod)%mod;
                  }
                  prev = r;
              }
          }
  
          w.p(ans);
      }
  
      // region pow(a, b, mod) -> a^b
          static long fpow (long b, long x, long mod) {
              if (x == 0) return 1;
              if (x == 1) return b;
              if (x % 2 == 0) return fpow (b * b % mod, x / 2, mod) % mod;
  
              return b * fpow (b * b % mod, x / 2, mod) % mod;
          }
          // endregion
  
          static long[] fact;
  
          static {
              int lim = 5005;
              fact = new long[lim];
              fact[0] = 1;
              fact[1] = 1;
              for(int i = 2; i < lim; i++) {
                  fact[i] = fact[i-1]*i;
                  fact[i] %= mod;
              }
          }
  
          static long ncr(long num, long den) {
              return ((num%mod)*fpow((den%mod), mod-2, mod))%mod;
          }
  }