#include <bits/stdc++.h>
int main(void) {
  int n, i, p;
  int h = 0;
  int sum = 0;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    p = h;
    scanf("%d", &h);
    if (p < h) {
      sum++;
    }
  }
  printf("%d", sum);
  return 0;
}
