#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t;
  int a[100];
  int x = 0, y = 0;
  int b[100];
  int count = 0;
  int j = 0;
  cin >> n >> t;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n - 1; i++) {
    if (a[i] % 2 == 0) {
      x++;
    } else if (a[i] % 2 != 0) {
      y++;
    }
    if (x == y) {
      b[j] = abs(a[i] - a[i + 1]);
      j++;
    }
  }
  sort(b, b + j);
  int i = 0;
  if (j != 0) {
    while (t >= 0) {
      t = t - b[i];
      if (t < 0) break;
      i++;
      count++;
    }
    cout << count;
  } else
    cout << "0";
}
