Vladik is a competitive programmer. This year he is going to win the International Olympiad in Informatics. But it is not as easy as it sounds: the question Vladik face now is to find the cheapest way to get to the olympiad.
Vladik knows _n_ airports. All the airports are located on a straight line. Each airport has unique id from 1 to _n_, Vladik's house is situated next to the airport with id _a_, and the place of the olympiad is situated next to the airport with id _b_. It is possible that Vladik's house and the place of the olympiad are located near the same airport.
To get to the olympiad, Vladik can fly between any pair of airports any number of times, but he has to start his route at the airport _a_ and finish it at the airport _b_.
Each airport belongs to one of two companies. The cost of flight from the airport _i_ to the airport _j_ is zero if both airports belong to the same company, and |_i_ - _j_| if they belong to different companies.
Print the minimum cost Vladik has to pay to get to the olympiad.
## Input
The first line contains three integers _n_, _a_, and _b_ (1 ≤ _n_ ≤ 105, 1 ≤ _a_, _b_ ≤ _n_) — the number of airports, the id of the airport from which Vladik starts his route and the id of the airport which he has to reach.
The second line contains a string with length _n_, which consists only of characters 0 and 1. If the _i_\-th character in this string is 0, then _i_\-th airport belongs to first company, otherwise it belongs to the second.
## Output
Print single integer — the minimum cost Vladik has to pay to get to the olympiad.
[samples]
## Note
In the first example Vladik can fly to the airport 2 at first and pay |1 - 2| = 1 (because the airports belong to different companies), and then fly from the airport 2 to the airport 4 for free (because the airports belong to the same company). So the cost of the whole flight is equal to 1. It's impossible to get to the olympiad for free, so the answer is equal to 1.
In the second example Vladik can fly directly from the airport 5 to the airport 2, because they belong to the same company.
Let $ n, a, b \in \mathbb{N} $ with $ 1 \leq a, b \leq n $.
Let $ s \in \{0,1\}^n $ be a binary string of length $ n $, where $ s[i] $ denotes the company of airport $ i+1 $ (1-indexed).
Define the cost function $ c(i, j) $ for $ 1 \leq i, j \leq n $:
$$
c(i, j) =
\begin{cases}
0 & \text{if } s[i-1] = s[j-1] \\
|i - j| & \text{otherwise}
\end{cases}
$$
Vladik must find a path $ p = (p_0, p_1, \dots, p_k) $ such that:
- $ p_0 = a $,
- $ p_k = b $,
- $ k \geq 0 $,
- and the total cost $ \sum_{t=0}^{k-1} c(p_t, p_{t+1}) $ is minimized.
Find $ \min \sum_{t=0}^{k-1} c(p_t, p_{t+1}) $ over all such paths.
**Note**: Since direct flight from $ a $ to $ b $ is always allowed, and intermediate stops can only reduce or maintain cost (due to zero-cost same-company flights), the minimum cost is:
$$
\min\left( |a - b| \cdot \mathbf{1}_{s[a-1] \ne s[b-1]}, \quad \min_{\substack{1 \leq i,j \leq n \\ s[i-1] = s[a-1],\, s[j-1] = s[b-1]}} \left( |a - i| + |j - b| \right) \right)
$$
But since any intermediate same-company airports can be used for free, the optimal strategy reduces to:
- If $ s[a-1] = s[b-1] $, cost = 0.
- Else, cost = $ \min(|a - b|, \min_{i: s[i-1] = s[a-1]} |a - i| + \min_{j: s[j-1] = s[b-1]} |j - b|) $
Actually, since we can go $ a \to i \to j \to b $ with $ s[i-1] = s[a-1] $, $ s[j-1] = s[b-1] $, and $ c(i,j) = 0 $ if $ s[i-1] = s[j-1] $, but if $ s[a-1] \ne s[b-1] $, then $ s[i-1] \ne s[j-1] $, so $ c(i,j) = |i - j| $, making total cost $ |a - i| + |i - j| + |j - b| \geq |a - b| $, so direct flight is optimal.
Wait — correction: if $ s[a-1] \ne s[b-1] $, then:
We can go $ a \to i $ (cost $ |a - i| $ if $ s[i-1] \ne s[a-1] $, else 0), then $ i \to j $ (cost 0 if $ s[i-1] = s[j-1] $, else $ |i - j| $), then $ j \to b $ (cost 0 if $ s[j-1] = s[b-1] $, else $ |j - b| $).
But since $ s[a-1] \ne s[b-1] $, if we choose $ i $ such that $ s[i-1] = s[a-1] $, and $ j $ such that $ s[j-1] = s[b-1] $, then $ s[i-1] \ne s[j-1] $, so $ c(i,j) = |i - j| $, and total cost is $ |a - i| + |i - j| + |j - b| \geq |a - b| $ by triangle inequality.
So the direct flight $ a \to b $ costs $ |a - b| $, and any detour through same-company airports cannot reduce cost below $ |a - b| $.
But wait — what if we use **one** intermediate airport $ k $ such that $ s[k-1] = s[a-1] $, and then go $ a \to k \to b $?
Then cost = $ c(a,k) + c(k,b) $.
If $ s[k-1] = s[a-1] $, then $ c(a,k) = 0 $.
Then $ c(k,b) = |k - b| $ if $ s[k-1] \ne s[b-1] $.
So total cost = $ |k - b| $.
We can choose $ k $ to minimize $ |k - b| $ among all $ k $ with $ s[k-1] = s[a-1] $.
Similarly, we could go $ a \to k \to b $ with $ s[k-1] = s[b-1] $, then $ c(a,k) = |a - k| $, $ c(k,b) = 0 $, total = $ |a - k| $.
So overall, if $ s[a-1] \ne s[b-1] $, the minimal cost is:
$$
\min\left( |a - b|, \min_{\substack{k=1 \\ s[k-1] = s[a-1]}}^n |k - b|, \min_{\substack{k=1 \\ s[k-1] = s[b-1]}}^n |a - k| \right)
$$
But note: $ \min_{k: s[k-1] = s[a-1]} |k - b| $ is the distance from $ b $ to the nearest airport with same company as $ a $.
Similarly for the other.
And since $ |a - b| $ is always an upper bound, the answer is:
$$
\begin{cases}
0 & \text{if } s[a-1] = s[b-1] \\
\min\left( |a - b|, \min_{k: s[k-1] = s[a-1]} |k - b|, \min_{k: s[k-1] = s[b-1]} |a - k| \right) & \text{otherwise}
\end{cases}
$$
But note: $ \min_{k: s[k-1] = s[a-1]} |k - b| \leq |a - b| $ only if there exists a $ k $ with $ s[k-1] = s[a-1] $ closer to $ b $ than $ a $ is. Similarly for the other.
Actually, since $ a $ itself satisfies $ s[a-1] = s[a-1] $, we have $ \min_{k: s[k-1] = s[a-1]} |k - b| \leq |a - b| $.
Similarly, $ \min_{k: s[k-1] = s[b-1]} |a - k| \leq |a - b| $.
So the minimum is just the minimum of those two values.
Thus, the answer is:
$$
\boxed{
\begin{cases}
0 & \text{if } s[a-1] = s[b-1] \\
\min\left( \min_{\substack{1 \leq k \leq n \\ s[k-1] = s[a-1]}} |k - b|,\ \min_{\substack{1 \leq k \leq n \\ s[k-1] = s[b-1]}} |a - k| \right) & \text{otherwise}
\end{cases}
}
$$