1073_C. Vasya and Robot
Vasya has got a robot which is situated on an infinite Cartesian plane, initially in the cell (0, 0). Robot can perform the following four kinds of operations: 

  * U — move from (x, y) to (x, y + 1); 
  * D — move from (x, y) to (x, y - 1); 
  * L — move from (x, y) to (x - 1, y); 
  * R — move from (x, y) to (x + 1, y). 



Vasya also has got a sequence of n operations. Vasya wants to modify this sequence so after performing it the robot will end up in (x, y).

Vasya wants to change the sequence so the length of changed subsegment is minimum possible. This length can be calculated as follows: maxID - minID + 1, where maxID is the maximum index of a changed operation, and minID is the minimum index of a changed operation. For example, if Vasya changes RRRRRRR to RLRRLRL, then the operations with indices 2, 5 and 7 are changed, so the length of changed subsegment is 7 - 2 + 1 = 6. Another example: if Vasya changes DDDD to DDRD, then the length of changed subsegment is 1. 

If there are no changes, then the length of changed subsegment is 0. Changing an operation means replacing it with some operation (possibly the same); Vasya can't insert new operations into the sequence or remove them.

Help Vasya! Tell him the minimum length of subsegment that he needs to change so that the robot will go from (0, 0) to (x, y), or tell him that it's impossible.

Input

The first line contains one integer number n~(1 ≤ n ≤ 2 ⋅ 10^5) — the number of operations.

The second line contains the sequence of operations — a string of n characters. Each character is either U, D, L or R.

The third line contains two integers x, y~(-10^9 ≤ x, y ≤ 10^9) — the coordinates of the cell where the robot should end its path.

Output

Print one integer — the minimum possible length of subsegment that can be changed so the resulting sequence of operations moves the robot from (0, 0) to (x, y). If this change is impossible, print -1.

Examples

Input

5
RURUU
-2 3


Output

3


Input

4
RULR
1 1


Output

0


Input

3
UUU
100 100


Output

-1

Note

In the first example the sequence can be changed to LULUU. So the length of the changed subsegment is 3 - 1 + 1 = 3.

In the second example the given sequence already leads the robot to (x, y), so the length of the changed subsegment is 0.

In the third example the robot can't end his path in the cell (x, y).
```python
# -*- coding: utf-8 -*-

"""
created by shhuan at 2018/11/3 11:30


search for minimum steps, consider binary search

"""

N = int(input())
ops = [x for x in input()]

X, Y = map(int, input().split())

dd = abs(X) + abs(Y)
lops = len(ops)
if dd > lops or (lops - dd) % 2 != 0:
    print(-1)
    exit(0)


[ll, lr, lu, ld, rl, rr, ru, rd] = [[0 for _ in range(lops + 2)] for _ in range(8)]

l, r, u, d = 0, 0, 0, 0
for i in range(lops):
    op = ops[i]
    if op == 'L':
        l += 1
    elif op == 'R':
        r += 1
    elif op == 'U':
        u += 1
    else:
        d += 1
    ll[i+1] = l
    lr[i+1] = r
    ld[i+1] = d
    lu[i+1] = u

l, r, u, d = 0, 0, 0, 0
for i in range(lops-1, -1, -1):
    op = ops[i]
    if op == 'L':
        l += 1
    elif op == 'R':
        r += 1
    elif op == 'U':
        u += 1
    else:
        d += 1
    rl[i] = l
    rr[i] = r
    rd[i] = d
    ru[i] = u

def check(lsub):
    for i in range(lops-lsub+1):
        # j-i+1 == lsub, j < lops => i+lsub-1 <lops => i < lops-lsub+1
        j = i + lsub - 1

        # l, r, u, d of lops [0, i-1], ll[i]={'L' of 0,...,i-1}
        l0, r0, u0, d0 = ll[i], lr[i], lu[i], ld[i]

        # l, r, u, d of ops [j+1, N-1], rr[j]={'R' of lops-1,...,j}
        l1, r1, u1, d1 = rl[j+1], rr[j+1], ru[j+1], rd[j+1]

        x = (r0+r1) - (l0+l1)
        y = (u0+u1) - (d0+d1)

        dx = abs(X-x)
        dy = abs(Y-y)

        if dx + dy <= lsub and (lsub-dx-dy) % 2 == 0:
            return True

    return False


sl, sr = 0, lops + 1
while sl < sr:
    m = (sl + sr) // 2
    if check(m):
        sr = m
    else:
        sl = m + 1

sl = -1 if sl > lops else sl
print(sl)




```