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.*;
  import java.util.concurrent.TimeUnit;
  
  public class d1622 implements Runnable{
      
      public static void main(String[] args) {
          try{
              new Thread(null, new d1622(), "process", 1<<26).start();
          }
          catch(Exception e){
              System.out.println(e);
          }
      }
      public void run() {
          FastReader scan = new FastReader();
          PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
  //      try {
  //            out = new PrintWriter("file.out");
  //        } catch (FileNotFoundException e) {
  //            // TODO Auto-generated catch block
  //            e.printStackTrace();
  //        }
          Task solver = new Task();
  //        int t = scan.nextInt();
          int t = 1;
          for(int i = 1; i <= t; i++) solver.solve(i, scan, out);
          out.close();
      }
  
      static class Task {
          static final int oo = Integer.MAX_VALUE;
          static final long OO = Long.MAX_VALUE;
          static final long MOD = 998244353;
  
          public void solve(int testNumber, FastReader sc, PrintWriter out) {            
              int N = sc.nextInt();
              int K = sc.nextInt();
              String s = sc.nextLine();
              if(K == 0) {
                  out.println(1);
                  return;
              }
              
              long[] fact = new long[N+1];
              fact[0] = 1;
              for(int i = 1; i < N+1; i++) {
                  fact[i] = (fact[i-1] * i) % MOD;
              }
              
              int numOnes = 0;
              long sum = 0;
              boolean flag = false;
              boolean add = false;
              for(int i = 0, j = 0; i < N; i++) {
                  if(s.charAt(i) == '1') {
                      numOnes++;
                  }
                  
                  while(numOnes > K) {
                      if(s.charAt(j) == '1') {
                          numOnes--;
                      }
                      j++;
                  }
                  
                  if(numOnes != K) {
                      continue;
                  }
                  
                  int numZeroes = (i - j + 1 - numOnes);
                  
                  sum += modDivide(fact[i - j + 1], (fact[numZeroes] * fact[numOnes]) % MOD, MOD);
                  
                  int nZ = numZeroes, nO = numOnes;
                  if(s.charAt(i) == '1') {
                      nO--;
                  } else {
                      nZ--;
                  }
                  
                  if(flag) {
                      sum -= modDivide(fact[i - j], (fact[nZ] * fact[nO]) % MOD, MOD);
                  } else {
                      flag = true;
                  }
                  if(sum != 0 && !add) {
                      add = true;
                  }
                  
                  sum %= MOD;
                  while(sum < 0)
                      sum += MOD;
                  
  //                System.out.println(numOnes + " " + numZeroes);
  //                System.out.println(sum);
              }
              
              if(sum == 0 && !add)
                  out.println(1);
              else
                  out.println(sum);
          }
      }
      
      static long modDivide(long a, long b, long MOD) {
          a %= MOD;
          return (binpow(b, MOD-2, MOD) * a) % MOD;
      }
      static long binpow(long a, long b, long m) {
          a %= m;
          long res = 1;
          while (b > 0) {
              if ((b & 1) == 1)
                  res = res * a % m;
              a = a * a % m;
              b >>= 1;
          }
          return res;
      }
      static int[] reverse(int a[]) 
      { 
          int[] b = new int[a.length]; 
          for (int i = 0, j = a.length; i < a.length; i++, j--) { 
              b[j - 1] = a[i]; 
          } 
          
          return b;
      }
      static long[] reverse(long a[]) 
      { 
          long[] b = new long[a.length]; 
          for (int i = 0, j = a.length; i < a.length; i++, j--) { 
              b[j - 1] = a[i]; 
          } 
          
          return b;
      }
      static void sort(int[] x){
          shuffle(x);
          Arrays.sort(x);
      }
      static void sort(long[] x){
          shuffle(x);
          Arrays.sort(x);
      }
      static class tup implements Comparable<tup>, Comparator<tup>{
          int a, b;
          tup(int a,int b){
              this.a=a;
              this.b=b;
          }
          public tup() {
          }
          @Override
          public int compareTo(tup o){
              return Integer.compare(b,o.b);
          }
          @Override
          public int compare(tup o1, tup o2) {
              return Integer.compare(o1.b, o2.b);
          }
          
          @Override
          public int hashCode() {
              return Objects.hash(a, b);
          }
   
          @Override
          public boolean equals(Object obj) {
              if (this == obj)
                  return true;
              if (obj == null)
                  return false;
              if (getClass() != obj.getClass())
                  return false;
              tup other = (tup) obj;
              return a==other.a && b==other.b;
          }
          
          @Override
          public String toString() {
              return a + " " + b;
          }
      }
      
      static void shuffle(int[] a) {
          Random get = new Random();
          for (int i = 0; i < a.length; i++) {
              int r = get.nextInt(a.length);
              int temp = a[i];
              a[i] = a[r];
              a[r] = temp;
          }
      }
  
      static void shuffle(long[] a) {
          Random get = new Random();
          for (int i = 0; i < a.length; i++) {
              int r = get.nextInt(a.length);
              long temp = a[i];
              a[i] = a[r];
              a[r] = temp;
          }
      }
  
      static class FastReader {
          BufferedReader br;
          StringTokenizer st;
  
          public FastReader() {
              br = new BufferedReader(new InputStreamReader(System.in));
          }
  
          public FastReader(String s) throws FileNotFoundException {
              br = new BufferedReader(new FileReader(new File(s)));
          }
  
          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;
          }
          
          int[] readArray(int size) {
              int[] a = new int[size];
              for(int i = 0; i < size; i++) {
                  a[i] = nextInt();
              }
              return a;
          }
          
          long[] readLongArray(int size) {
              long[] a = new long[size];
              for(int i = 0; i < size; i++) {
                  a[i] = nextLong();
              }
              return a;
          }
      }
      
      static void dbg(int[] arr) {
          System.out.println(Arrays.toString(arr));
      }
      static void dbg(long[] arr) {
          System.out.println(Arrays.toString(arr));
      }
      static void dbg(boolean[] arr) {
          System.out.println(Arrays.toString(arr));
      }
  
      static void dbg(Object... args) {
          for (Object arg : args)
              System.out.print(arg + " ");
          System.out.println();
      }
  }