#include<bits/stdc++.h>
using namespace std;

const int maxn = 1e5 + 7;
const int oo = 1e9 + 7;

int a[maxn];

int main()
{
    int n;
    ios_base::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	freopen("MUNG.INP", "r", stdin);
	freopen("MUNG.OUT", "w", stdout);
    cin >> n;
    int cnt = 0;
    for(int i = 1; i <= n; i++) cin >> a[i];
    int last = a[n];
    for(int i = n - 1; i >= 1; i--) {
        if(a[i] > last) {
            last = a[i];
            cnt++;
        }
    }
    cout << cnt << endl;
}
