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 Solution {
      static 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();
          }
          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;
          }
      }
      static void sort(int a[]){ // int -> long
          ArrayList<Integer> arr=new ArrayList<>(); // Integer -> Long
          for(int i=0;i<a.length;i++)
          arr.add(a[i]);
          Collections.sort(arr);
          for(int i=0;i<a.length;i++)
          a[i]=arr.get(i);
          
      }
      private static long gcd(long a, long b){
          if(b==0)return a;
          return gcd(b,a%b);
      }
      private static long pow(long x,long y){
          if(y==0)return 1;
          long temp = pow(x, y/2);
          if(y%2==1){
              return (((x*temp)%mod)*temp)%mod;
          }
          else{
              return (temp*temp)%mod;
          }
      }
      static int log(long n){
          int res = 0;
          while(n>0){
              res++;
              n/=2;
          }
          return res;
      }
  
      static int mod = (int)998244353;
      static int INF = Integer.MAX_VALUE;
      static PrintWriter out;
      static FastReader sc ;
      public static void main(String[] args) throws IOException {
          sc = new FastReader();
          out = new PrintWriter(System.out);
          // primes();
          // ================================ //
          int n = sc.nextInt();
          int k = sc.nextInt();
          String s = sc.nextLine();
          solver(s, n, k);
          // ================================ //
          out.flush();
      }
  
      public static void solver(String s, int n, int k) {
          if(k==0){
              out.println( 1);
              return;
          }
          int[]pre = new int[n+1];
          for(int i=1;i<=n;i++){
              pre[i] = pre[i-1]+(s.charAt(i-1)-'0');
          }
          if(k>pre[n]){
              out.println( 1);
              return;
          }
          int start =0, end = 1;
          int last = 0;
          while(end<=n && pre[end]<=k){
              if(s.charAt(end-1)=='1')last = end;
              end++;
          }
          end--;
          long res = 0;
          // System.out.println("__"+ncr(10,2,mod));
          while(end<=n){
              if(start==0)
                  res=(res+ncr(end-start, k, mod)+mod)%mod; 
              else
                  res=(res+ncr(end-start, k, mod)-ncr(last-start-1,k-1,mod)+mod)%mod; 
              // System.out.println(start+" "+end+" "+last+"== "+res);
              // System.out.println("__"+    res);
              // if(res<0)res+=mod;
              
              int temp = end;
              while(end<=n && pre[end]-pre[start]<=k+1){
                  if(end>0 && s.charAt(end-1)=='1')last = end;
                  end++;
              }
              end--;
              if(temp==end)break;
              while(start<=end && pre[end]-pre[start]>k){
                  start++;
              }
          }
          out.println( res);
      }
  
      // Returns n^(-1) mod p
      static long modInverse(long n, long p)
      {
          // System.out.println("__"+    pow(n,p-2));
          return pow(n, p - 2);
      }
   
      // Returns nCr % p using Fermat's
      // little theorem.
      static long ncr(int n, int r,
                               int p)
      {
   
            if (n<r)
                return 0;
        // Base case
          if (r == 0)
              return 1;
   
          // Fill factorial array so that we
          // can find all factorial of r, n
          // and n-r
          long[] fac = new long[n + 1];
          fac[0] = 1;
   
          for (int i = 1; i <= n; i++)
              fac[i] = fac[i - 1] * i % p;
   
          return ((long)fac[n] * modInverse(fac[r], p)
                  % p * modInverse(fac[n - r], p)
                  % p)
              % p;
      }
  }
  