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