#agc046c. [agc046_c]Shift

[agc046_c]Shift

Problem Statement

Given is a string SS consisting of 0 and 1. Find the number of strings, modulo 998244353998244353, that can result from applying the following operation on SS between 00 and KK times (inclusive):

  • Choose a pair of integers i,ji, j (1leqi<jleqS)(1\\leq i < j\\leq |S|) such that the ii-th and jj-th characters of SS are 0 and 1, respectively. Remove the jj-th character from SS and insert it to the immediate left of the ii-th character.

Constraints

  • 1leqSleq3001 \\leq |S| \\leq 300
  • 0leqKleq1090 \\leq K \\leq 10^9
  • SS consists of 0 and 1.

Input

Input is given from Standard Input in the following format:

SS KK

Output

Find the number of strings, modulo 998244353998244353, that can result from applying the operation on SS between 00 and KK times (inclusive).


Sample Input 1

0101 1

Sample Output 1

4

Four strings, 0101, 0110, 1001, and 1010, can result.


Sample Input 2

01100110 2

Sample Output 2

14

Sample Input 3

1101010010101101110111100011011111011000111101110101010010101010101 20

Sample Output 3

113434815