Page not loading? Try clicking here.
Placeholder

#8713

Boiled Eggs 1s 512MB

Problems

You want to boil eggs for breakfast. You have n eggs and a pot.

It takes 15 minutes to boil a pot of eggs (no matter the number of eggs).

It is risky to put more than P eggs in the pot and the pot can carry at most Q grams of eggs.

Now you are given the weight of the eggs in grams, and you have exactly 15 minutes in hand.

Write a program to find the maximum number of eggs that you can boil without taking any risk.


Input

Integer in the first line n (1 ≤ n ≤ 30) , P (1 ≤ P ≤ 30) , Q (1 ≤ Q ≤ 100) is given.

In the next line n A set of positive integers (not greater than 10) are given. These integers represent the weight of the egg (in grams).


Output

Print the desired result.


Example #1

3 2 10
1 3 2
2

Example #2

4 5 5
4 4 5 5
1

Example #3

5 5 15
2 5 5 5 9
3


Source

ICPC Thailand Southern Programming Contest 2012 C번 (수정)
You must sign in to write code.