eolymp
bolt
Try our new interface for solving problems
Problems

Even neighbours

Even neighbours

The sequence of integers is given. Count the number of elements with two even neighbours. \InputFile The first line contains the number of elements $n~(n \le 1000)$ in the sequence. The second line contains $n$ elements, each of them does not exceed $100$ by absolute value. \OutputFile Print the number of elements with two even neighbours.
Time limit 1 second
Memory limit 128 MiB
Input example #1
6
1 2 3 4 5 6
Output example #1
2