N, *A = map(int, open(0).read().split()) c = 0 for i in range(N - 1): if A[i] < A[i + 1]: continue c += 1 print(N - c)