#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
using namespace std;
const int MOD = 1000000007;
const int Nmax = 2000006;
long long gcd(long long a, long long b) {
  if (a == 0) {
    return b;
  }
  return gcd(b % a, a);
}
int lcm(int a, int b) { return (a * b) / gcd(a, b); }
bool isPrime(long long n) {
  for (int i = 2; i <= sqrt(n); i++)
    if (n % i == 0) return 0;
  return 1;
}
void binaryRepresentation(int x) {
  for (int i = 31; i >= 0; i--) {
    if (x & (1 << i))
      cout << "1";
    else
      cout << "0";
  }
}
int combination(int n, int r) {
  if (r == n || r == 0) {
    return 1;
  }
  return combination(n - 1, r - 1) + combination(n - 1, r);
}
bool isPowerOfTwo(long long n) {
  if (n == 0) return false;
  return (ceil(log2(n)) == floor(log2(n)));
}
long long power(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = (ans * a);
    b /= 2;
    a = (a * a);
  }
  return ans;
}
long long inverse(long long i) {
  if (i == 1) return 1;
  return (MOD - ((MOD / i) * inverse(MOD % i)) % MOD + MOD) % MOD;
}
bool cmp(const pair<long long, long long> &a,
         const pair<long long, long long> &b) {
  if (a.first == b.first) return a.second < b.second;
  return a.first > b.first;
}
string toString(long long a) {
  ostringstream temp;
  temp << a;
  return temp.str();
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<long long> ar(n);
  for (long long i = 0; i < n; i++) cin >> ar[i];
  vector<long long> temp = ar;
  sort(temp.begin(), temp.end());
  vector<long long> pre(n, 0);
  pre[0] = ar[0];
  for (long long i = 1; i < n; i++) pre[i] = pre[i - 1] + ar[i];
  vector<long long> p(n, 0);
  p[0] = temp[0];
  for (long long i = 1; i < n; i++) p[i] = p[i - 1] + temp[i];
  long long ans = 0;
  for (long long i = 0; i < n; i++) {
    if (pre[i] == p[i]) {
      ans++;
    }
  }
  cout << ans;
  return 0;
}
