#include<stdio.h>
int main()
{
int x[50000];
int a,b;
scanf("%d",&a);
for(int i=0;i<a;i++)
{
scanf("%d",&x[i]);
}
for(int i=0;i<a;i++)
{
if(x[i]%2==0)
{
if(x[i+1]%2==1)
{
b++;
}
}
}
printf("%d",b);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: