#include using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define REP(i,a) FOR(i,0,a) const int MAX_N=1e5; int N; int a[MAX_N]; int main(){ cin.tie(0); ios::sync_with_stdio(false); cin>>N; REP(i,N){ cin>>a[i]; } int ans=0; int ma=a[0]; FOR(i,1,N){ if (ma>a[i]) ans++; ma=max(ma,a[i]); } cout<