include[HTML_REMOVED]
include[HTML_REMOVED]
include[HTML_REMOVED]
using namespace std;
const int N=110;
int a[N],cost[N];
int n,B;
int main(){
cin>>n>>B;
for(int i=1;i<=n;i)cin>>a[i];
int s=0,t=0;
int k=0;
for(int i=1;i<=n;i){
if(a[i]%2)s;
else{
t;
}
if(s==t&&a[i+1])cost[k]=abs(a[i+1]-a[i]);
}
int sum=0;
int res=0;
sort(cost,cost+k);
for(int i=0;i<k;i){
sum=cost[i];
B-=sum;
if(B<0)break;
res++;
}
cout<<res<<endl;
return 0;
}