For an array $$$a$$$ of length $$$n$$$, we define the aura of the array to be the number of indices $$$i$$$ ($$$1 \leq i \leq n-1$$$) such that at least one of the following conditions holds:
You are given an array $$$a$$$ of length $$$n$$$. You may perform the following operation any number of times:
After performing the operation some number of times (possibly zero), you would like to know the maximum possible aura of the resulting array $$$a$$$.
The first line of input contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$).
The second line of input contains $$$n$$$ integers $$$a_1, a_2, ..., a_n$$$ ($$$1 \leq a_i \leq 100$$$).
Output a single integer — the maximum possible aura of the array $$$a$$$ after performing any number of operations.
41 2 3 4
0
72 6 1 7 3 5 4
1
56 6 7 7 7
4
In the first example, no number of operations can result in an aura greater than 0.
In the second example, the elements $$$1$$$ and $$$6$$$ can be swapped to obtain $$$[2, 1, 6, 7, 3, 5, 4]$$$, which has an aura of $$$1$$$.
| Name |
|---|


