#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> S(N);
  int num = 1;
  int num2 = 0;
  for (int i = 0; i < N; ++i) {
    cin >> S[i];
  }
  for (int i = 0; i < N - 2; ++i) {
    for (int k = 0; k < N - 1; ++k) {
      num2++;
      if (S[i] > S[i + num2]) {
        continue;
      }
    }
    num++;
  }
  cout << num;
}
