Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/for-eng-uzun-osuvchi-bolak

Longest increasing run

Medium 1000 ms 64 MB 49%
Share

A positive integer $N$ and $N$ integers $a_{1}, a_{2}, \dots, a_{N}$ are given. Find the length (the count of numbers) of the longest run of consecutive numbers, each strictly greater than the previous one. A single number is also a run of length $1$.

The longest increasing stretch of the sequence

Input

The first line contains $N$. The second line contains $N$ integers separated by spaces.

Output

One integer — the length of the longest increasing run.

Note

$1 \le N \le 1000$
$-10^{9} \le a_{i} \le 10^{9}$

Examples

Input #1
7
1 2 2 3 4 5 1
Output #1
4
Input #2
3
5 4 3
Output #2
1

Sign in to submit a solution

Signing up is free and takes a minute.