#include using namespace std; #define ll long long #define ld long double #define pb push_back #define mp make_pair #define pii pair #define pll pair #define pdd pair #define all(x) (x).begin(), (x).end() #define fi first #define se second int n, a[100005]; int main() { cin.sync_with_stdio(false); scanf("%d", &n); for (int i = 1; i <= n; i++) scanf("%d", &a[i]); int sol = 0; for (int i = 10; i + 9 <= n; i++) { bool ok = 1; for (int j = i - 1; j >= i - 9; j--) if (a[j] >= a[j + 1]) { ok = 0; break; } for (int j = i + 1; j <= i + 9; j++) if (a[j - 1] <= a[j]) { ok = 0; break; } if (ok) sol++; } printf("%d\n", sol); return 0; }