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.Arrays;
  import java.util.Random;
  import java.util.StringTokenizer;
  
  public class codeforces_Edu120_D {
      static long mod = 998_244_353;
      static long[] fact = getFact(5000);
  
      private static long[] getFact(int size) {
          long[] res = new long[size + 1];
          res[0] = 1;
          for (int i = 1; i <= size; i++) {
              res[i] = res[i - 1] * i % mod;
          }
          return res;
      }
  
      private static long cnk(int n, int k) {
          return fact[n] * pow(fact[k] * fact[n - k] % mod, mod - 2) % mod;
      }
  
      private static long pow(long a, long b) {
          long res = 1;
          while (b > 0) {
              if (b % 2 == 0) {
                  a = (a * a) % mod;
                  b /= 2;
              } else {
                  res = (res * a) % mod;
                  b--;
              }
          }
          return res;
      }
  
      private static void solve(FastIOAdapter in, PrintWriter out) {
          int n = in.nextInt();
          int k = in.nextInt();
          char[] s = in.next().toCharArray();
  
          if (k == 0) {
              out.println(1);
              return;
          }
          int st = 0;
          int end = 0;
          int cur = s[0] == '1' ? 1 : 0;
          while (end + 1 < n) {
              if (s[end + 1] == '1') {
                  if (cur + 1 <= k) cur++;
                  else break;
              }
              end++;
          }
  
          long ans = 1;
          int prevEnd = st + k - 2;
          while (cur == k && st < n) {
              long cnk = cnk(end - st + 1, k) - 1;
              cnk = (cnk + mod) % mod;
              int prevLen = prevEnd - st + 1;
              long prevCnk = cnk(prevLen, k - 1) - 1;
              prevCnk = (prevCnk + mod) % mod;
              ans += cnk - prevCnk;
              ans = (ans + mod) % mod;
              prevEnd = end;
              while (st < n && s[st] == '0') {
                  st++;
              }
              st++;
              cur--;
              while (end + 1 < n) {
                  if (s[end + 1] == '1') {
                      if (cur + 1 <= k) cur++;
                      else break;
                  }
                  end++;
              }
          }
          out.println(ans);
      }
  
      public static void main(String[] args) throws Exception {
          try (FastIOAdapter ioAdapter = new FastIOAdapter()) {
              int count = 1;
              //count = ioAdapter.nextInt();
              while (count-- > 0) {
                  solve(ioAdapter, ioAdapter.out);
              }
          }
      }
  
      static void ruffleSort(int[] arr) {
          int n = arr.length;
          Random rnd = new Random();
          for (int i = 0; i < n; ++i) {
              int tmp = arr[i];
              int randomPos = i + rnd.nextInt(n - i);
              arr[i] = arr[randomPos];
              arr[randomPos] = tmp;
          }
          Arrays.sort(arr);
      }
  
      static class FastIOAdapter implements AutoCloseable {
          BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
          public PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter((System.out))));
          StringTokenizer st = new StringTokenizer("");
  
          String next() {
              while (!st.hasMoreTokens())
                  try {
                      st = new StringTokenizer(br.readLine());
                  } catch (IOException e) {
                      e.printStackTrace();
                  }
              return st.nextToken();
          }
  
          String nextLine() {
              try {
                  return br.readLine();
              } catch (IOException e) {
                  e.printStackTrace();
                  return null;
              }
          }
  
          int nextInt() {
              return Integer.parseInt(next());
          }
  
          int[] readArray(int n) {
              int[] a = new int[n];
              for (int i = 0; i < n; i++) a[i] = nextInt();
              return a;
          }
  
          long[] readArrayLong(int n) {
              long[] a = new long[n];
              for (int i = 0; i < n; i++) a[i] = nextLong();
              return a;
          }
  
          long nextLong() {
              return Long.parseLong(next());
          }
  
          @Override
          public void close() throws Exception {
              out.flush();
              out.close();
              br.close();
          }
      }
  }
  