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.OutputStream;
  import java.io.IOException;
  import java.io.InputStream;
  import java.io.PrintWriter;
  import java.util.InputMismatchException;
  import java.io.IOException;
  import java.io.InputStream;
  
  /**
   * Built using CHelper plug-in
   * Actual solution is at the top
   *
   * @author dauom
   */
  public class Main {
    public static void main(String[] args) {
      InputStream inputStream = System.in;
      OutputStream outputStream = System.out;
      InputReader in = new InputReader(inputStream);
      PrintWriter out = new PrintWriter(outputStream);
      DShuffle solver = new DShuffle();
      solver.solve(1, in, out);
      out.close();
    }
  
    static class DShuffle {
      private static final ModArithmetic mod = new ModArithmetic(998244353, true);
      private static final int[][] fif = mod.getFactorialAndInverse(5005);
      private static final int[] f = fif[0];
      private static final int[] fi = fif[1];
  
      private static int ways(int z, int o) {
        return mod.mul(f[o + z], fi[o], fi[z]);
      }
  
      public final void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        int k = in.nextInt();
        char[] s = in.nextCharArray();
        if (k == 0) {
          out.println("1");
          return;
        }
  
        int ans = 1;
        int l = 0, r = -1;
        int c = 0;
        while (l < n) {
          while (r + 1 < n && c + s[r + 1] - '0' <= k) {
            c += s[++r] - '0';
          }
          if (c < k) {
            break;
          }
  
          int total = r - l + 1;
          int ones = k;
          int zeroes = total - k;
          ans = mod.add(ans, mod.sub(ways(zeroes, ones), 1));
  //      out.println(l + "," +  r + " : " + zeroes + " " + ones);
  //      out.println("+" + mod.sub(ways(zeroes, ones), 1));
  
          if (r == n - 1) {
            break;
          }
  
          while (c == k && l <= r) {
            c -= s[l++] - '0';
          }
          total = Integer.max(r - l + 1, 0);
          ones = c;
          zeroes = total - c;
          ans = mod.sub(ans, mod.sub(ways(zeroes, ones), 1));
  //      out.println("-" + mod.sub(ways(zeroes, ones), 1));
        }
        out.println(ans);
      }
  
    }
  
    static final class InputReader {
      private final InputStream stream;
      private final byte[] buf = new byte[1 << 18];
      private int curChar;
      private int numChars;
  
      public InputReader() {
        this.stream = System.in;
      }
  
      public InputReader(final InputStream stream) {
        this.stream = stream;
      }
  
      private int read() {
        if (this.numChars == -1) {
          throw new UnknownError();
        } else {
          if (this.curChar >= this.numChars) {
            this.curChar = 0;
  
            try {
              this.numChars = this.stream.read(this.buf);
            } catch (IOException ex) {
              throw new InputMismatchException();
            }
  
            if (this.numChars <= 0) {
              return -1;
            }
          }
  
          return this.buf[this.curChar++];
        }
      }
  
      public final int nextInt() {
        int c;
        for (c = this.read(); isSpaceChar(c); c = this.read()) {
        }
  
        byte sgn = 1;
        if (c == 45) { // 45 == '-'
          sgn = -1;
          c = this.read();
        }
  
        int res = 0;
  
        while (c >= 48 && c <= 57) { // 48 == '0', 57 == '9'
          res *= 10;
          res += c - 48; // 48 == '0'
          c = this.read();
          if (isSpaceChar(c)) {
            return res * sgn;
          }
        }
  
        throw new InputMismatchException();
      }
  
      public final String next() {
        int c;
        while (isSpaceChar(c = this.read())) {
        }
  
        StringBuilder result = new StringBuilder();
        result.appendCodePoint(c);
  
        while (!isSpaceChar(c = this.read())) {
          result.appendCodePoint(c);
        }
  
        return result.toString();
      }
  
      private static boolean isSpaceChar(final int c) {
        return c == 32 || c == 10 || c == 13 || c == 9
            || c == -1; // 32 == ' ', 10 == '\n', 13 == '\r', 9 == '\t'
      }
  
      public final char[] nextCharArray() {
        return next().toCharArray();
      }
  
    }
  
    static final class ModArithmetic {
      public static final int DEFAULT_MOD = 1_000_000_007;
      public final int m;
      public final boolean isPrime;
  
      public ModArithmetic() {
        this(DEFAULT_MOD, true);
      }
  
      public ModArithmetic(int mod) {
        this(mod, false);
      }
  
      public ModArithmetic(int mod, boolean isPrime) {
        if (mod <= 0) {
          throw new IllegalArgumentException("Modulo must be > 0");
        }
        this.m = mod;
        this.isPrime = isPrime;
      }
  
      public final int add(int a, int b) {
        a += b;
        if (a >= m) {
          a -= m;
        }
        return a;
      }
  
      public final int sub(int a, int b) {
        a -= b;
        if (a < 0) {
          a += m;
        }
        return a;
      }
  
      public final int mul(int a, int b) {
        long m = a * (long) b;
        if (m >= this.m) {
          m %= this.m;
        }
        return (int) m;
      }
  
      public final int mul(int a, int b, int... c) {
        long m = a * (long) b;
        if (m >= this.m) {
          m %= this.m;
        }
        for (int x : c) {
          m *= x;
          if (m >= this.m) {
            m %= this.m;
          }
        }
        return (int) m;
      }
  
      public final int div(int a, int b) {
        if (isPrime) {
          return mul(a, pow(b, m - 2));
        }
        throw new UnsupportedOperationException();
      }
  
      public final int pow(long a, long b) {
        long res = 1;
        while (b > 0) {
          if ((b & 1) == 1) {
            res *= a;
            if (res >= m) {
              res %= m;
            }
          }
          b >>= 1;
          a *= a;
          if (a >= m) {
            a %= m;
          }
        }
        return (int) res;
      }
  
      public final int[][] getFactorialAndInverse(int n) {
        int[] f = new int[n + 1];
        int[] fi = new int[n + 1];
        f[0] = 1;
        for (int i = 1; i <= n; i++) {
          f[i] = mul(f[i - 1], i);
        }
        fi[n] = div(1, f[n]);
        for (int i = n - 1; i >= 0; i--) {
          fi[i] = mul(fi[i + 1], i + 1);
        }
        return new int[][]{f, fi};
      }
  
      public String toString() {
        return "ModArithmetic{" + "m=" + m + ", isPrime=" + isPrime + '}';
      }
  
    }
  }
  
  