#include <bits/stdc++.h>
using namespace std;
long long int A[100004];
pair<long long int, long long int> B[100004];
long long int ans = 1, n, maks = -1, mins = 1000000001;
int main() {
  cin >> n;
  mins = 1000000001;
  maks = -1;
  for (int i = 1; i <= n; i++) {
    cin >> A[i];
  }
  B[0].first = maks;
  B[n + 1].second = mins;
  for (int j = 1; j <= n; j++) {
    if (A[j] > B[j - 1].first)
      B[j].first = A[j];
    else
      B[j].first = B[j - 1].first;
  }
  for (int k = n; k >= 1; k--) {
    if (A[k] < B[k + 1].second)
      B[k].second = A[k];
    else
      B[k].second = B[k + 1].second;
  }
  for (int l = 1; l <= n - 1; l++) {
    if (B[l].first <= B[l + 1].second) ans++;
  }
  cout << ans << endl;
  return 0;
}
