n = int(input()) A = list(map(int, input().split())) ans = 0 i = 0 while i < n: ans += 1 if i < n - 1: if A[i] > A[i + 1]: i += 1 i += 1 print(ans)