#abc251b. [abc251_b]At Most 3 (Judge ver.)

[abc251_b]At Most 3 (Judge ver.)

Problem Statement

There are NN weights called Weight 11, Weight 22, dots\\dots, Weight NN. Weight ii has a mass of AiA_i.
Let us say a positive integer nn is a good integer if the following condition is satisfied:

  • We can choose at most 33 different weights so that they have a total mass of nn.

How many positive integers less than or equal to WW are good integers?

Constraints

  • 1leqNleq3001 \\leq N \\leq 300
  • 1leqWleq1061 \\leq W \\leq 10^6
  • 1leqAileq1061 \\leq A_i \\leq 10^6
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

NN WW A1A_1 A2A_2 dots\\dots ANA_N

Output

Print the answer.


Sample Input 1

2 10
1 3

Sample Output 1

3

If we choose only Weight 11, it has a total mass of 11, so 11 is a good integer.
If we choose only Weight 22, it has a total mass of 33, so 33 is a good integer.
If we choose Weights 11 and 22, they have a total mass of 44, so 44 is a good integer.
No other integer is a good integer. Also, all of 11, 33, and 44 are integers less than or equal to WW. Therefore, the answer is 33.


Sample Input 2

2 1
2 3

Sample Output 2

0

There are no good integers less than or equal to WW.


Sample Input 3

4 12
3 3 3 3

Sample Output 3

3

There are 33 good integers: 3,63, 6, and 99.
For example, if we choose Weights 11, 22, and 33, they have a total mass of 99, so 99 is a good integer.
Note that 1212 is not a good integer.


Sample Input 4

7 251
202 20 5 1 4 2 100

Sample Output 4

48