import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int prev = Integer.MIN_VALUE; int ans = 0; int count = 0; for (int i = 0; i < n; i++) { int x = sc.nextInt(); if (prev > x) { count++; } else { ans += count / 2; count = 1; } prev = x; } ans += count / 2; System.out.println(n - ans); } }