#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, k = 1;
  int az[n];
  cin >> n;
  for (i = 0; i = n - 1; i++) {
    cin >> az[i];
  }
  i = 0;
  while (az[i] < az[i + 1]) {
    k++;
  }
  cout << k << endl;
}
