Byteland is a country that can be modeled as a one dimensional axis of length L. You have N network towers that you want to set up in byteland, you want to place each tower at some position between 1 and L (inclusive). You can only place towers at integer positions, you can’t place more than one tower at the same place.
Tower i has a range Ri. Two towers i and j can only communicate if the distance between these towers doesn’t exceed min(Ri, Rj). You want to place towers in byteland so that any two adjacent towers should be able to communicate with each other. Note, two adjacent towers need not be in the adjacent positions, there may be empty positions between two adjacent towers. You want to know how many possible ways there are. Two ways are considered different, if there is at least one tower i such that its position is not same in these two ways.
Input
The first line contains two integers N (1 ≤ N ≤ 100) and L (1 ≤ L ≤ 105). The second line contains N integers R1, R2, ..., Rn (1 ≤ Ri ≤ 100).
Output
Print a single integer with the answer. As the answer can be large, output it modulo 998244353
.
Sample
Sample Input | Sample Output |
---|---|
3 5 1 2 2 | 26 |
Notes
Explanation
Some possible placements for the sample case (0 means, no tower placed at this position)