Toby has found a game to entertain himself.The game is like this:

You are in a coordinate system initially at (0,0) and you are given a sequence of steps which lead to your destination.The steps are given in the form of directions: ’U’ ,’D’ , ’L’ and ‘R’ for up, down, left and right respectively.If you are at position (x,y) then:
- U:move to (x,y+1)
- D:move to (x,y-1)
- L:move to (x-1,y)
- R:move to (x+1,y)
The sequence is provided as a string ‘s’ of characters where $s_i$ $(1 \leq i \leq N)$ is one of the direction character as mentioned above.An example of a sequence of steps is:   UULRUDR

The destination according to this string is (1,2).

You want to remove maximum number of characters from the string such that the resulting string leads to the same destination as before.
For example in the example above we can remove characters at positions 1,3,4,6 and the resulting path will be UUR which will lead to the same destination i.e (1,2).so we reduced the number of steps by 4,and this is our score.
You need to get maximum score.

-----Input:-----
- First line will contain $T$, number of testcases. Then the testcases follow. 
- First line of each testcase contains a single integer $N$,size of string. 
- Second line of testcase contains a string $s$ of size $N$.

-----Output:-----
For each testcase, output a single line containing the maximum score possible.

-----Constraints-----
- $1 \leq T \leq 1000$
- $1 \leq N \leq 10^5$

-----Sample Input:-----
3

7

ULUDLLU

4

RUUR

4

LRLR   

-----Sample Output:-----
2

0

4    

-----EXPLANATION:-----
- 
test case 1:
The final destination after moving according to the sequence is (-3,2).

One way is to remove characters at positions 3,4 and the resulting string will be ULLLU and destination still remains (-3,2).
- 
test case 2: No character can be removed in this case.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = "# cook your dish here\nfrom collections import Counter\nfor i in range(int(input())):\n n=int(input())\n s=input()\n res = Counter(s) \n \n re=abs(res['D']-res['U'])+abs(res['L']-res['R'])\n print(n-re)"
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13553