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 Main {
  
      private static long MOD = 998244353;
  
      static void sortArray(long[] a) {
          Random random = new Random();
  
          for (int i = 0; i < a.length; i++) {
              int randomPos = random.nextInt(a.length);
              long t = a[i];
              a[i] = a[randomPos];
              a[randomPos] = t;
          }
          Arrays.sort(a);
      }
  
      static long c(int n, int k, long mod) {
          k = Math.min(k, n - k);
  
          if (k == 0) {
              return 1;
          }
  
          long nn = 1;
          for (long i = n - k + 1; i < n + 1; i++) {
              nn = nn * i % mod;
          }
          long kk = 1;
  
          long[] rs = new long[k + 1];
          rs[1] = 1;
          for (int i = 2; i < k + 1; i++) {
              rs[i] = (mod - (mod / i) * rs[(int) (mod % i)] % mod) % mod;
              kk = (kk * rs[i]) % mod;
          }
  
          return nn * kk % mod;
      }
  
  
      public static void main(String[] args) throws FileNotFoundException {
          InputReader in = new InputReader(System.in);
          PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
  
          long startTime = System.currentTimeMillis();
  
          int n = in.nextInt();
          int k = in.nextInt();
  
          if (k == 0) {
              out.println(1);
              out.close();
              return;
          }
  
          String s = in.nextString();
          int[] ones = new int[n + 1];
          for (int i = 1; i <= n; i++) {
              ones[i] = ones[i - 1] + (s.charAt(i - 1) == '1' ? 1 : 0);
          }
  
          int l = 0;
          int r = 0;
  
          int cnt = 0;
          while (r < n) {
              if (s.charAt(r) == '1') {
                  cnt++;
              }
              if (cnt == k + 1) {
                  cnt--;
                  break;
              }
              r++;
          }
          if (cnt < k) {
              out.println(1);
              out.close();
              return;
          }
  
          long ans = c(r - l, k, MOD);
          while (r < n) {
              int oldR = r;
              while (s.charAt(l) != '1') {
                  l++;
              }
              l++;
              cnt--;
              while (r < n) {
                  if (s.charAt(r) == '1') {
                      cnt++;
                  }
                  if (cnt == k + 1) {
                      cnt--;
                      break;
                  }
                  r++;
              }
              if (cnt < k) {
                  break;
              }
              ans = (ans + c(r - l, k, MOD) - 1) % MOD;
              if (oldR > l) {
                  int kk = ones[oldR] - ones[l];
                  ans = (ans - c(oldR - l, kk, MOD) + 1 + MOD) % MOD;
              }
          }
  
          out.println(ans);
  
  
  //        System.out.println(System.currentTimeMillis() - startTime);
  
          out.close();
      }
  
      private static void outputArray(int[] ans, PrintWriter out, boolean addOne) {
          StringBuilder str = new StringBuilder();
          for (long an : ans) {
              str.append(addOne ? (an + 1) : an).append(" ");
          }
          out.println(str);
  //        out.flush();
      }
  
      private static class InputReader {
          public BufferedReader reader;
          public StringTokenizer tokenizer;
  
          public InputReader(InputStream stream) {
              reader = new BufferedReader(new InputStreamReader(stream), 32768);
              tokenizer = null;
          }
  
          private String next() {
              while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                  try {
                      tokenizer = new StringTokenizer(reader.readLine());
                  } catch (IOException e) {
                      throw new RuntimeException(e);
                  }
              }
              return tokenizer.nextToken();
          }
  
          public String nextString() {
              try {
                  return reader.readLine();
              } catch (IOException e) {
                  throw new RuntimeException(e);
              }
          }
  
          public int nextInt() {
              return Integer.parseInt(next());
          }
  
          public long nextLong() {
              return Long.parseLong(next());
          }
  
          public double nextDouble() {
              return Double.parseDouble(next());
          }
  
          public char nextChar() {
              return next().charAt(0);
          }
  
          public String nextWord() {
              return next();
          }
  
          private List<Integer>[] readTree(int n) {
              return readGraph(n, n - 1);
          }
  
          private List<Integer>[] readGraph(int n, int m) {
              List<Integer>[] result = new List[n];
              for (int i = 0; i < n; i++) {
                  result[i] = new ArrayList<>();
              }
              for (int i = 0; i < m; i++) {
                  int u = nextInt() - 1;
                  int v = nextInt() - 1;
                  result[u].add(v);
                  result[v].add(u);
              }
              return result;
          }
  
          private Map<Integer, Long>[] readWeightedGraph(int n, int m) {
              Map<Integer, Long>[] result = new HashMap[n];
              for (int i = 0; i < n; i++) {
                  result[i] = new HashMap<>();
              }
              for (int i = 0; i < m; i++) {
                  int u = nextInt() - 1;
                  int v = nextInt() - 1;
                  long w = nextLong();
                  result[u].put(v, Math.min(w, result[u].getOrDefault(v, Long.MAX_VALUE)));
                  result[v].put(u, Math.min(w, result[v].getOrDefault(u, Long.MAX_VALUE)));
              }
              return result;
          }
  
          private int[] readArray(int size, boolean subOne) {
              int[] a = new int[size];
              for (int i = 0; i < size; i++) {
                  a[i] = nextInt() + (subOne ? -1 : 0);
              }
              return a;
          }
  
          private long[] readLongArray(int size) {
              long[] a = new long[size];
              for (int i = 0; i < size; i++) {
                  a[i] = nextLong();
              }
              return a;
          }
      }
  }