There are $n$ soldiers in the line, standing shoulder to shoulder from left to right. Each soldier's head is turned either to the left or to the right, that is, each of the soldiers is looking either strictly to the left or strictly to the right.
You need to give some of the soldiers an order to turn their heads in the opposite direction. That means, after executing this order, a soldier looking to the left should turn his head to the right, and a soldier looking to the right should turn his head to the left. After executing the order, there should exist a soldier such that all other soldiers look at him (it doesn't matter in which direction that soldier looks). Only the soldiers who were given the order turn their heads.
For example, if there are $5$ soldiers in the line, the first three soldiers are looking to the right, and the fifth soldier is looking to the left, then they all are looking at the fourth soldier.
Find the minimum number of soldiers who should be given the order to turn their heads so that all the soldiers were looking in the direction of some single soldier.
The first line contains an integer $n$ ($2 <= n <= 2 thin 000$) — the number of soldiers in the line.
The second line contains a string $s$ of length $n$, consisting of the letters "_L_" and "_R_". If the $i$-th character of the string is "_L_", then the $i$-th soldier is looking to the left. If the $i$-th character of the string is "_R_", then the $i$-th soldier is looking to the right.
Print the minimum number of soldiers who should be given the order to turn their heads so that there exists a soldier such that all other soldiers look at him (it doesn't matter in which direction that soldier looks).
In the first example, you need to give the order, for example, to the first and sixth soldiers. After that, the line would look like "_RRRRLL_". So everyone except the fifth soldier would be looking at the fifth soldier.
In the second example, all the soldiers are looking to the left, so the second and third soldiers are looking at the first soldier, so you don't need to give any orders.
## Input
The first line contains an integer $n$ ($2 <= n <= 2 thin 000$) — the number of soldiers in the line.The second line contains a string $s$ of length $n$, consisting of the letters "_L_" and "_R_". If the $i$-th character of the string is "_L_", then the $i$-th soldier is looking to the left. If the $i$-th character of the string is "_R_", then the $i$-th soldier is looking to the right.
## Output
Print the minimum number of soldiers who should be given the order to turn their heads so that there exists a soldier such that all other soldiers look at him (it doesn't matter in which direction that soldier looks).
[samples]
## Note
In the first example, you need to give the order, for example, to the first and sixth soldiers. After that, the line would look like "_RRRRLL_". So everyone except the fifth soldier would be looking at the fifth soldier.In the second example, all the soldiers are looking to the left, so the second and third soldiers are looking at the first soldier, so you don't need to give any orders.
**Definitions**
Let $ n \in \mathbb{Z} $ with $ 2 \leq n \leq 2000 $.
Let $ s = s_1 s_2 \dots s_n $ be a string over $ \{L, R\} $, where $ s_i = L $ means soldier $ i $ looks left, $ s_i = R $ means soldier $ i $ looks right.
**Constraints**
For each soldier $ i \in \{1, \dots, n\} $:
- If $ s_i = L $, the soldier looks toward soldier $ i-1 $ (if $ i > 1 $).
- If $ s_i = R $, the soldier looks toward soldier $ i+1 $ (if $ i < n $).
**Objective**
Find the minimum number of soldiers to flip (i.e., change $ L \leftrightarrow R $) such that there exists an index $ k \in \{1, \dots, n\} $ where:
- For all $ i < k $, soldier $ i $ looks right (i.e., $ s_i = R $),
- For all $ i > k $, soldier $ i $ looks left (i.e., $ s_i = L $).
That is, find:
$$
\min_{k=1}^{n} \left( \sum_{i=1}^{k-1} \mathbf{1}_{s_i \neq R} + \sum_{i=k+1}^{n} \mathbf{1}_{s_i \neq L} \right)
$$