#include <bits/stdc++.h>
#define ll long long
#define N 1000005
using namespace std;
ll a[1000005],d=0,h=0,n;
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);
    freopen("CAU4.INP","r",stdin);
    freopen("CAU4.OUT","w",stdout);
    cin>>n;
    for (int i=1;i<=n;i++)
    {
        cin>>a[i];
        if (a[i]>a[i-1])
            d++;
    }
    cout<<n-d;
    return 0;
}
