# Ferris Wheel

There are children who want to go to a Ferris wheel, and your task is to find a gondola for each child.

Each gondola may have one or two children in it, and in addition, the total weight in a gondola may not exceed . You know the weight of every child.

What is the minimum number of gondolas needed for the children?

The first input line contains two integers and : the number of children and the maximum allowed weight.

The next line contains integers : the weight of each child.

Print one integer: the minimum number of gondolas.

Input:

Output:

Each gondola may have one or two children in it, and in addition, the total weight in a gondola may not exceed . You know the weight of every child.

What is the minimum number of gondolas needed for the children?

**Input**The first input line contains two integers and : the number of children and the maximum allowed weight.

The next line contains integers : the weight of each child.

**Output**Print one integer: the minimum number of gondolas.

**Constraints****Example**Input:

`4 10`

7 2 3 9

Output:

`3`

## 0 Comments

If you have any doubts/suggestion/any query or want to improve this article, you can comment down below and let me know. Will reply to you soon.