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.util.*;
  import java.io.*;
  
  public class E120D {
      static long mod = 998244353;
      static long[][] choose;
      static long[] fact;
  	
  	public static void main(String[] args) throws IOException {
          FastScanner in = new FastScanner(System.in);
          PrintWriter out = new PrintWriter(System.out);
          
          int n = in.nextInt();
      	int k = in.nextInt();
      	
      	if (k == 0) {
      		out.println(1);
      		out.close();
      		return;
      	}
      	
      	choose = new long[n + 1][n + 1];
      	choose[0][0] = 1;
      	fact = new long[n + 1];
      	fact[0] = 1;
      	
      	String bin = in.nextLine();
      	int[] a = new int[n];
      	for (int i = 0; i < n; i++) a[i] = bin.charAt(i) - '0';
      	int[] pf = new int[n + 1];
      	
      	for (int i = 0; i < n; i++) {
      		pf[i + 1] = pf[i] + a[i];
      	}
      	
      	long ans = 1;
      	
      	if (pf[n] >= k) {
      		for (int i = 0; i < n; i++) {
      			for (int j = i + 1; j < n; j++) {
      				int ct = pf[j + 1] - pf[i];
      				if (ct <= k) {
      					ct -= (a[i] ^ 1) + (a[j] ^ 1);
      					//out.println((j - i - 1) + " " + ct);
      					ans = (ans + nck(j - i - 1, ct)) % mod;
      				}
      			}
      		}
      	}
      	
      	out.println(ans);
  
          out.close();
  
      }
  
  	static long nck(int a, int b) {
  		if (b < 0 || a < b) return 0;
  		if (choose[a][b] != 0) return choose[a][b];
  		if (a == b) return choose[a][b] = 1;
  		if (b == 0) return choose[a][b] = 1;
  		return choose[a][b] = (nck(a - 1, b - 1) + nck(a - 1, b)) % mod;
  	}
  	
  	static long factorial(int a) {
  		if (fact[a] != 0) return fact[a];
  		return fact[a] = (factorial(a - 1) * a) % mod;
  	}
  
      static class FastScanner {
          BufferedReader br;
          StringTokenizer st;
          public FastScanner(InputStream i) {
              br = new BufferedReader(new InputStreamReader(i));
              st = new StringTokenizer("");
          }
          public String next() throws IOException {
              if (st.hasMoreTokens()) {
                  return st.nextToken();
              }
              else
                  st = new StringTokenizer(br.readLine());
              return next();
          }
          public int nextInt() throws IOException {
              return Integer.parseInt(next());
          }
          public double nextDouble() throws IOException {
              return Double.parseDouble(next());
          }
          public long nextLong() throws IOException {
              return Long.parseLong(next());
          }
          public String nextLine() throws IOException {
              if (!st.hasMoreTokens()) {
                  st = new StringTokenizer(br.readLine());
                  return nextLine();
              }
  
              String ret = "";
              while (st.hasMoreTokens()) {
                  ret += st.nextToken();
              }
              return ret;
          }
          public int[] nextIntArr(int size) throws IOException {
              int[] arr = new int[size];
              for (int i = 0; i < arr.length; i++) {
                  arr[i] = nextInt();
              }
              return arr;
          }
          public long[] nextLongArr(int size) throws IOException {
              long[] arr = new long[size];
              for (int i = 0; i < arr.length; i++) {
                  arr[i] = nextLong();
              }
              return arr;
          }
          public double[] nextDoubleArr(int size) throws IOException {
              double[] arr = new double[size];
              for (int i = 0; i < arr.length; i++) {
                  arr[i] = nextDouble();
              }
              return arr;
          }
      }
  }