#GD0000015. Ổ USB (USB Flash Drives)

Ổ USB (USB Flash Drives)

USB Flash Drives

Source: Codeforces

Version: Phuoc Hung OJ Extended

Problem Statement

There are nn USB drives, where drive ii has capacity aia_i MB. A file of size mm MB may be split among drives. Find the minimum number of drives needed.

Input

The first line contains nn. The second line contains mm. Each of the next nn lines contains one capacity aia_i.

Output

Print the minimum number of drives needed.

Subtasks

General constraints:

  • 1≤n≤1001 \le n \le 100.

  • 1≤m≤1051 \le m \le 10^5.

  • 1≤ai≤10001 \le a_i \le 1000.

  • ∑ai≥m\sum a_i \ge m.

  • Subtask 1 (20 points): n≤10n \le 10, m≤1000m \le 1000

  • Subtask 2 (30 points): n≤50n \le 50, m≤2⋅104m \le 2\cdot10^4

  • Subtask 3 (50 points): No additional constraints.

Examples

Input

3
5
2
1
3

Output

2

Explanation

The drives of capacities 33 and 22 total exactly 55 MB, so two drives suffice; no single drive has enough capacity.