#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i;
  cin >> n;
  int sum, ans = 0;
  vector<int> v(n);
  for (i = 0; i < n; ++i) cin >> v[i];
  for (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;
}
