- Time limit: 1.00 s
- Memory limit: 512 MB
Input
The first input line has two integers $n$ and $x$: the number of people and the maximum allowed weight in the elevator.
The second line has $n$ integers $w_1,w_2,\dots,w_n$: the weight of each person.
Output
Print one integer: the minimum number of rides.
Constraints
- $1 \le n \le 20$
- $1 \le x \le 10^9$
- $1 \le w_i \le x$
Input:
4 10
4 8 6 1
Output:
2