#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  int unit[200];
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> unit[i];
  }
  int base = unit[0], ans = 0, min = 0;
  for (int i = 0; i < N; i++) {
    for (int j = 0; j <= i; j++) {
      if (unit[j] < unit[i]) min = 1;
    }
    if (min == 1) ans++;
    min = 0;
  }
  cout << ans << endl;
  return 0;
}
