# Longest Increasing Subsequence

medium

1. You are given a number n, representing the number of elements. 2. You are given n numbers, representing the contents of array of length n. 3. You are required to print the length of longest increasing subsequence of array.

## Constraints

0 <= n <= 20 0 <= n1, n2, .. <= 100

## Format

### Input

A number n .. n more elements

### Output

A number representing the length of longest increasing subsequence of array.

## Example

Sample Input

10
10
22
9
33
21
50
41
60
80
1

### Sample Output

6

Question Video