#include<iostream>
using namespace std;
int main()
{
    int n,i,j,num[200000],number=1,minnum;
    cin>>n>>minnum;
    for(i=1;i<n;i++)
    {
        cin>>num[i];
        if(minnum>=num[i])
        {
            number++;
            minnum=num[i];
        }
    }
    cout<<number;
    return 0;
}