#include <bits/stdc++.h>
using namespace std;
long long const delta = 1000000007;
int main() {
  std::ios::sync_with_stdio(0);
  ;
  cin.tie(0);
  cout.tie(0);
  long long n, b;
  cin >> n >> b;
  long long a[n];
  long long odd = 0, even = 0;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] % 2 == 0)
      even++;
    else
      odd++;
  }
  vector<long long> ans;
  long long temp1 = 0, temp2 = 0;
  for (long long i = 0; i < n; i++) {
    if (a[i] % 2 == 0)
      temp1++;
    else
      temp2++;
    if (temp1 == temp2 && i != n - 1) {
      ans.push_back(llabs(a[i + 1] - a[i]));
      ;
      temp1 = temp2 = 0;
    }
  }
  long long cnt = 0, sum = 0;
  sort(ans.begin(), ans.end());
  for (long long i = 0; i < ans.size(); i++) {
    sum += ans[i];
    if (sum > b) break;
    cnt++;
  }
  cout << cnt;
  return 0;
}

### Prompt

Your task is to create a Cpp solution to the following problem:

There are a lot of things which could be cut — trees, paper, "the rope". In this problem you are going to cut a sequence of integers.

There is a sequence of integers, which contains the equal number of even and odd numbers. Given a limited budget, you need to make maximum possible number of cuts such that each resulting segment will have the same number of odd and even integers.

Cuts separate a sequence to continuous (contiguous) segments. You may think about each cut as a break between two adjacent elements in a sequence. So after cutting each element belongs to exactly one segment. Say, [4, 1, 2, 3, 4, 5, 4, 4, 5, 5] → two cuts → [4, 1 | 2, 3, 4, 5 | 4, 4, 5, 5]. On each segment the number of even elements should be equal to the number of odd elements.

The cost of the cut between x and y numbers is |x - y| bitcoins. Find the maximum possible number of cuts that can be made while spending no more than B bitcoins.

Input

First line of the input contains an integer n (2 ≤ n ≤ 100) and an integer B (1 ≤ B ≤ 100) — the number of elements in the sequence and the number of bitcoins you have.

Second line contains n integers: a_1, a_2, ..., a_n (1 ≤ a_i ≤ 100) — elements of the sequence, which contains the equal number of even and odd numbers

Output

Print the maximum possible number of cuts which can be made while spending no more than B bitcoins.

Examples

Input

6 4
1 2 5 10 15 20


Output

1


Input

4 10
1 3 2 4


Output

0


Input

6 100
1 2 3 4 5 6


Output

2

Note

In the first sample the optimal answer is to split sequence between 2 and 5. Price of this cut is equal to 3 bitcoins.

In the second sample it is not possible to make even one cut even with unlimited number of bitcoins.

In the third sample the sequence should be cut between 2 and 3, and between 4 and 5. The total price of the cuts is 1 + 1 = 2 bitcoins.

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
long long const delta = 1000000007;
int main() {
  std::ios::sync_with_stdio(0);
  ;
  cin.tie(0);
  cout.tie(0);
  long long n, b;
  cin >> n >> b;
  long long a[n];
  long long odd = 0, even = 0;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] % 2 == 0)
      even++;
    else
      odd++;
  }
  vector<long long> ans;
  long long temp1 = 0, temp2 = 0;
  for (long long i = 0; i < n; i++) {
    if (a[i] % 2 == 0)
      temp1++;
    else
      temp2++;
    if (temp1 == temp2 && i != n - 1) {
      ans.push_back(llabs(a[i + 1] - a[i]));
      ;
      temp1 = temp2 = 0;
    }
  }
  long long cnt = 0, sum = 0;
  sort(ans.begin(), ans.end());
  for (long long i = 0; i < ans.size(); i++) {
    sum += ans[i];
    if (sum > b) break;
    cnt++;
  }
  cout << cnt;
  return 0;
}

```