Submit solution

Points:
3 (partial)

Time limit:
1.0s

Memory limit:
256M

Author:

Problem type

Allowed languages

Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, ~~CommonLisp~~, D, Dart, F#, Forth, Fortran, Go, ~~Groovy~~, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, ~~Nim~~, ~~ObjC~~, OCaml, ~~Octave~~, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

Given an array of integers , representing the heights of towers, print out the number of *good* towers.

A tower is *good* if it is **strictly** greater than the tower to the left of it and is **strictly** smaller than the tower to the right of it. Towers at the start and end of the array cannot be *good*.

#### Input Specification

You will receive two lines of input. The first will be integer , representing the length of array .

The next line will contain space-separated integers.

It is guaranteed that each tower's height is in the range .

#### Output Specification

Output the number of *good* towers.

#### Sample Input 1

```
5
1 3 4 2 5
```

#### Sample Output 1

`1`

## Comments