import sequtils,strutils var N = stdin.readline.parseInt A = stdin.readline.split.map(parseInt) cnt : int for i in 0.. A[i + 1] and A[i + 2] > A[i + 1] and A[i + 2] != A[i]: cnt += 1 echo cnt