Recording Songs#810

Recording Songs

1 second
64 megabytes
Easy

During a music concert broadcast, entrepreneur decided to start a business producing cassettes. He has cassettes, each with a playback capacity of , and wants to record as many songs as possible on them. There are songs, transmitted in order 1, 2, \ldots, N, each with a known duration: L(1), L(2), \ldots, L(N). The entrepreneur can make the following choices:

Determine the maximum number of songs the entrepreneur can record on the cassettes.

Input

The first line contains the number (M \leq 200).

The second line contains (D \leq 10^9).

The third line contains (N \leq 500).

The fourth line contains L(1), L(2), \ldots, L(N). Each L(i) \leq D.

All input values are natural numbers.

Output

Output a single integer, the maximum number of songs that can be recorded.

Examples

Example 1

Loading
Loading