#include using namespace std; int n, a[100003]; int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin >> n; if (n < 19) { cout << 0; return 0; } for (int i = 1; i <= n; ++i) cin >> a[i]; int cnt = 0; int pos1, pos2; a[n + 1] = 0x3f3f3f3f; a[0] = 0x3f3f3f3f; for (int i = 10; i + 9 <= n; ++i) { pos1 = i - 1; pos2 = i + 1; while (a[pos1] < a[pos1 + 1]) pos1--; while (a[pos2] < a[pos2 - 1]) pos2++; if (pos2 == i + 10 && pos1 == i - 10) ++cnt; } cout << cnt; return 0; }