#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, b, a[1000], ans[1000];
  while (cin >> n >> b) {
    int cnt = 0;
    memset(ans, 0, sizeof(ans));
    for (int i = 1; i <= n; i++) cin >> a[i];
    int sj = 0, so = 0;
    for (int i = 2; i <= n - 2; i += 2) {
      int flag = 0;
      for (int j = 1; j <= i; j++) {
        if (a[j] % 2 == 0)
          sj++;
        else
          so++;
      }
      if (sj == so) {
        sj = 0;
        so = 0;
        flag = 1;
      } else {
        sj = 0;
        so = 0;
        continue;
      }
      for (int j = i + 1; j <= n; j++) {
        if (a[j] % 2 == 0)
          sj++;
        else
          so++;
      }
      if (sj == so && flag == 1 && sj != 0) {
        ans[cnt++] = abs(a[i + 1] - a[i]);
      }
      sj = 0;
      so = 0;
    }
    int ant = 0, sum = 0;
    sort(ans, ans + cnt);
    for (int i = 0; i < cnt; i++) {
      sum += ans[i];
      if (sum <= b) {
        ant++;
      }
    }
    cout << ant << endl;
  }
}
