#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int mt[100];
  int ans = 1;
  for (int i = 0; i < N; i++) {
    cin >> mt[i];
  }
  if (mt[N] < mt[0]) {
    cout << '1' << endl;
  }
  for (int j = 1; j < N; j++) {
    if (mt[0] <= mt[j]) {
      if (mt[j] >= mt[j - 1]) ans += 1;
    }
  }
  cout << ans << endl;
  return 0;
}
