#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
int a[MAXN], dp[MAXN];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  dp[n - 1] = a[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    dp[i] = a[i];
    dp[i] = min(dp[i], dp[i + 1]);
  }
  int ans = 1, mx = -0x3f3f3f3f;
  for (int i = 0; i < n; i++) {
    mx = max(mx, a[i]);
    if (dp[i + 1] >= mx) ans++;
  }
  cout << ans << endl;
  return 0;
}
