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 new1{
  	
  	public static long power(long x, long y, int mod) {
  	    //System.out.println(x + " ");
  		if( y == 0) return 1;
  		if( y == 1) return x;
  		long a = power(x, y / 2, mod);
  		long ans = (a * a) % mod;
  		ans = (ans * power(x, y - (y / 2) * 2, mod)) % mod;
  		return ans;
  	}
  	
  	public static long modInv(long p, int mod) {
  		//System.out.println(p + " " + mod);
  		return power(p, mod - 2, mod);
  	}
  	
  	public static long ncr(long[] arr, long[] arri, int n, int r, int mod) {
  		if(n < 0 || r < 0 || n - r < 0) return 0;
  		long numer = arr[n];
  		long ans = (numer * arri[n - r]) % mod;
  		ans = (ans * arri[r]) % mod;
  		return ans;
  	}
  
  	public static void main(String[] args)  throws IOException{
      	BufferedWriter output = new BufferedWriter(new OutputStreamWriter(System.out));
  		FastReader s = new FastReader();
  		int n1 = 5005;
  		int mod = 998244353;
  		long[] arr = new long[n1];
  		long[] arri = new long[n1];
  		arr[0] = 1; arr[1] = 1;
  		arri[1] = 1;
  		arri[0] = 1;
  		for(int i = 2; i < n1; i++) {
  			arr[i] = (arr[i - 1] * i) % mod;
  			arri[i] = (arri[i - 1] * modInv(i, mod)) % mod;
  			//if(arri[i] < 0) System.out.println(arri[i]);
  		}
  		//System.out.println(Arrays.toString(arri));
  		int t = 1;//s.nextInt();
      	for(int z = 0; z < t; z++) {
      		int n = s.nextInt();
      		int k = s.nextInt();
      		String str = s.next();
      		long ans = 1;
      		for(int i = 0; i < n; i++) {
      			int j = i; int o = 0; int ze = 0;
      			while(j >= 0) {
      				
      				if(str.charAt(j) == '0') ze++;
      				if(str.charAt(j) == '1' && o + 1 <= k) o++;
      				else if(str.charAt(j) == '1' && o + 1 > k) break;
      				j--;
      			}
      			if(o != k) continue;
      			if(j < 0) {
      				ans = ncr(arr, arri, ze + o, ze, mod);
      				//System.out.println(ze + " " + o + " ! " + i);
      				continue;
      			}
      			if(str.charAt(i) == '0') o--;
      			else ze--;
      			
      			long aa = ncr(arr, arri, ze + o, ze, mod);
      			ans = (ans + aa) % mod;
      			//System.out.println(ze + " " + o + " " + " " + aa + " " + ans + " " + i);
      			
      			
      		}
      		System.out.println(ans);
      		
      		
      	}
      	//output.flush();
  
      }
  }
  
  
  class FastReader {
      BufferedReader br;
      StringTokenizer st;
      public FastReader() {
          br = new BufferedReader(new InputStreamReader(System.in));
      }
      String next() {
          while (st == null || !st.hasMoreElements()) {
              try {
                  st = new StringTokenizer(br.readLine());
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
          return st.nextToken();
      }
   
      public int nextInt() {
          return Integer.parseInt(next());
      }
   
      long nextLong() {
          return Long.parseLong(next());
      }
   
      double nextDouble() {
          return Double.parseDouble(next());
      }
   
      String nextLine() {
          String str = "";
          try {
              str = br.readLine();
          } catch (IOException e) {
              e.printStackTrace();
          }
          return str;
  }}