#ARC070B. [ABC056D] No Need

[ABC056D] No Need

Score : 600600 points

Problem Statement

AtCoDeer the deer has NN cards with positive integers written on them. The number on the ii-th card (1iN)(1 \leq i \leq N) is aia_i. Because he loves big numbers, he calls a subset of the cards good when the sum of the numbers written on the cards in the subset, is KK or greater.

Then, for each card ii, he judges whether it is unnecessary or not, as follows:

  • If, for any good subset of the cards containing card ii, the set that can be obtained by eliminating card ii from the subset is also good, card ii is unnecessary.
  • Otherwise, card ii is NOT unnecessary.

Find the number of the unnecessary cards. Here, he judges each card independently, and he does not throw away cards that turn out to be unnecessary.

Constraints

  • All input values are integers.
  • 1N50001 \leq N \leq 5000
  • 1K50001 \leq K \leq 5000
  • 1ai109(1iN)1 \leq a_i \leq 10^9 (1 \leq i \leq N)

Partial Score

  • 300300 points will be awarded for passing the test set satisfying N,K400N,K \leq 400.

Input

The input is given from Standard Input in the following format:

NN KK

a1a_1 a2a_2 ... aNa_N

Output

Print the number of the unnecessary cards.

3 6
1 4 3
1

There are two good sets: {2,32,3} and {1,2,31,2,3}.

Card 11 is only contained in {1,2,31,2,3}, and this set without card 11, {2,32,3}, is also good. Thus, card 11 is unnecessary.

For card 22, a good set {2,32,3} without card 22, {33}, is not good. Thus, card 22 is NOT unnecessary.

Neither is card 33 for a similar reason, hence the answer is 11.

5 400
3 1 4 1 5
5

In this case, there is no good set. Therefore, all the cards are unnecessary.

6 20
10 4 3 10 25 2
3