#include <bits/stdc++.h>
using namespace std;
int ch = 0, nch = 0, n, k, a[101], ans = 0, sum = 0;
vector<int> way;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (ch == nch && nch != 0) {
      way.push_back(abs(a[i] - a[i - 1]));
    }
    if (a[i] % 2 == 0)
      ch++;
    else
      nch++;
  }
  sort(way.begin(), way.end());
  for (int i = 0; i < way.size(); i++) {
    sum += way[i];
    if (sum <= k) ans++;
  }
  cout << ans;
  return 0;
}
