The Birthday GiftEasy

The Birthday Gift

Easy+10 XP · +5 Aurabasicsloopsconditional

Rohan wants to buy a birthday gift for his best friend. He has a list of potential gifts, each with a specific price. He also has a budget. Rohan can only buy one gift. Help Rohan find out how many gifts he can afford.

You are given the prices of N distinct gifts and Rohan's budget. Count how many gifts Rohan can buy.

Input

The first line contains two integers, N (the number of gifts) and B (Rohan's budget). The second line contains N space-separated integers, representing the prices of the N distinct gifts.

Output

Print a single integer: the number of gifts Rohan can afford.

Constraints

1 <= N <= 1000 1 <= B <= 100000 1 <= price_i <= 100000

Time limit 1 s (native code; slower languages get more)Memory 256 MB14 hidden tests

Example 1

Input
5 100
20 50 120 80 30
Output
4

There are 5 gifts and the budget is 100. Gifts costing 20, 50, 80, and 30 are affordable. The gift costing 120 is not. So, 4 gifts are affordable.

Example 2

Input
3 50
60 70 80
Output
0

There are 3 gifts and the budget is 50. All gifts cost more than the budget, so 0 gifts are affordable.

Hints