AT_abc468_a [ABC468A] Maximal Value
Description
You are given an integer sequence of length $ N $ : $ A=(A_1,A_2,\ldots,A_N) $ .
Find the number of integers $ i $ between $ 1 $ and $ N-2 $ (inclusive) satisfying $ A_i < A_{i+1} > A_{i+2} $ .
Input Format
The input is given from Standard Input in the following format:
> $ N $ $ A_1 $ $ A_2 $ $ \ldots $ $ A_N $
Output Format
Output the answer.
Explanation/Hint
### Sample Explanation 1
Two values $ i=2,4 $ satisfy the condition. Thus, output $ 2 $ .
### Constraints
- $ 3\le N\le 100 $
- $ 1\le A_i\le 100 $
- All input values are integers.