시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 512 MB 47 30 26 60.465%

## 문제

You are in charge of feeding the seals in the Welsh Mountain Zoo. This involves purchasing buckets of fish and allocating them to volunteers to trek into the enclosure and distribute fairly to the blubbery residents.

The buckets of fish are already set out. Each volunteer can be assigned to carry either one or two of these buckets, as long as the combined weight of the buckets is small enough.

How many volunteers will you need to distribute all of the fish in one trip?

## 입력

• The first line contains the number of buckets to be delivered, n (1 ≤ n ≤ 105), and the integer carrying capacity of a volunteer, c (1 ≤ c ≤ 109).
• The second line contains the integer weights of each of the n buckets, w1 . . . wn (1 ≤ w ≤ c).

## 출력

Output the minimum number of volunteers required to deliver all of the buckets of fish.

## 예제 입력 1

4 100
44 35 66 67


## 예제 출력 1

3


## 예제 입력 2

1 10
7


## 예제 출력 2

1


## 예제 입력 3

3 12
10 5 6


## 예제 출력 3

2


## 출처

• 문제를 만든 사람: Ian Pratt-Hartmann