#include <bits/stdc++.h>
using namespace std;
using int64 = long long int;
using uint = unsigned int;
using uint64 = unsigned long long int;
using pii = pair<int, int>;
using pll = pair<int64, int64>;
const int nmax = 100005;
int h[nmax];
map<int, int> m;
void erase_elem(int x) {
  auto it = m.find(x);
  if (it->second == 1)
    m.erase(it);
  else
    --it->second;
}
int get_min() { return m.begin()->first; }
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> h[i];
    auto it = m.find(h[i]);
    if (it == m.end())
      m.insert({h[i], 1});
    else
      ++it->second;
  }
  int result = 1;
  int cmax = h[1];
  erase_elem(h[1]);
  for (int i = 2; i <= n; ++i) {
    if (cmax > get_min()) {
      cmax = max(cmax, h[i]);
    } else {
      ++result;
      cmax = h[i];
    }
    erase_elem(h[i]);
  }
  cout << result << '\n';
  return 0;
}
