#include #include #include #define f first #define s second using namespace std; int v[100010]; int main () { // freopen ("file.in", "r", stdin); int n; scanf ("%d", &n); v[0] = 2000000000; int nr = 1, rez = 0; for (int i = 1; i <= n; ++i) { scanf ("%d", &v[i]); if (nr < 10 && v[i - 1] < v[i]) ++nr; else if (nr >= 10 && v[i - 1] > v[i]) ++nr; else nr = 1; if (nr == 19) { ++rez; nr = 1; } } printf ("%d\n", rez); return 0; }