#include<iostream>
#include<vector>
using namespace std;

int main(){
	int n;cin>>n;
  	int sum,ans=0;
	vector<int>v(n);
  	for(int i=0;i<n;++i)cin>>v[i];
  	for(int i=0;i<n;++i){
      sum=0;
      for(int j=0;j<n-i;++j)
    	if(v[i]>=v[i+j])++sum;
    }if(sum==n-1-i)++ans;
  cout<<ans<<endl;return 0;
}
