A reservoir gauge logs n water-level readings over a season, in chronological order. A stable stretch is any subsequence of readings (not necessarily consecutive) taken in chronological order whose values never go down — that is, each chosen reading is greater than or equal to the previously chosen one (a non-decreasing subsequence). Report the greatest number of readings a stable stretch can contain.
Input format
Line 1: an integer n.
Line 2: n space-separated integers, the readings in chronological order.
Output format
A single integer: the length of the longest non-decreasing subsequence.
Constraints
- 1 <= n <= 100000
- -1000000000 <= reading <= 1000000000