#include <bits/stdc++.h>
using namespace std;
int a[102];
vector<int> b;
int main() {
  ios_base::sync_with_stdio(0);
  int n, t;
  cin >> n >> t;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int kc = 0;
  int kn = 0;
  for (int i = 1; i < n; i++) {
    if (a[i] % 2 == 1)
      kn++;
    else
      kc++;
    if (kc == kn) b.push_back(abs(a[i + 1] - a[i]));
  }
  int k = 0;
  sort(b.begin(), b.end());
  for (auto x : b) {
    if (t - x >= 0) k++, t -= x;
  }
  cout << k;
  return 0;
}
