You are given an integer sequence $A=(A_1,A_2,\ldots,A_N)$ of length $N$.
You can perform the following operation zero or more times in any order:
* Choose an integer $k$ between $1$ and $|A|-3$, inclusive, such that $A_k=A_{k+1}=A_{k+2}=A_{k+3}$, and remove $A_k,A_{k+1},A_{k+2},A_{k+3}$ from $A$. (More formally, replace $A$ with $(A_1,A_2,\ldots,A_{k-1},A_{k+4},A_{k+5},\ldots,A_N)$.)
Here, $|A|$ represents the length of the integer sequence $A$.
Find the minimum possible value of the final $|A|$ after repeating the operation.
## Constraints
* $1\le N\le 2\times 10^5$
* $1\le A_i\le N$
* All input values are integers.
## Input
The input is given from Standard Input in the following format:
$N$
$A_1$ $A_2$ $\ldots$ $A_N$
[samples]