#include<bits/stdc++.h>
#define x first
#define y second
usingnamespacestd;vector<int>v;intmain(){ios_base::sync_with_stdio(0);cin.tie(0);intn;cin>>n;v.resize(n);for(inti=0;i<n;i++){cin>>v[i];}intnow=0;intans=0;for(inti=n-1;i>=0;i--){if(v[i]>now){now=v[i];ans++;}}cout<<ans<<"\n";}