A river separates Upper Barareh from Lower Barareh. To transport people between these two towns, a two-seater boat (a boat that can carry at most two people) with a certain weight capacity has been provided. This boat must be steered by at least one person, i.e. it cannot move across the river without any passengers.

The National Barareh Festival is scheduled to be held in Upper Barareh. All Lower Barareh residents want to participate in this celebration and need to move to Upper Barareh as quickly as possible. Your task is to help them move to Upper Barareh with the minimum number of boat trips across the river.

Input

The first line of the input contains two integers nn and ww, where nn is the number of Lower Barareh residents (1≤n≤10001 \le n \le 1000), and ww is the maximum weight the boat can carry (1≤w≤1061 \le w \le 10^6). The next line contains nn space-separated integers, describing the weights of the residents of Lower Barareh. All the weights are positive integers not exceeding 10610^6.

Output

If it is not possible to transfer all the residents of Lower Barareh, print a single line containing -1 in the output. Otherwise, print the minimum number of times the boat must travel between Lower Barareh and Upper Barareh (in both directions) in order to transfer all residents of Lower Barareh to Upper Barareh.

Constraints

  • 1≤n≤10001 \le n \le 1000
  • 1≤w≤1061 \le w \le 10^6
  • Weights are positive integers at most 10610^6

Example 1

Input 1
3 7
1 3 4
Output 1
3

Example 2

Input 2
3 4
2 3 4
Output 2
-1

Comments0


No comments yet

Be the first to comment.

New comment


Log in to join the discussion.