You have a string $s$ consisting of $n$ characters. Each character is either 0 or 1.

You can perform operations on the string. Each operation consists of two steps:  select an integer $i$ from $1$ to the length of the string $s$, then delete the character $s_i$ (the string length gets reduced by $1$, the indices of characters to the right of the deleted one also get reduced by $1$);  if the string $s$ is not empty, delete the maximum length prefix consisting of the same characters (the indices of the remaining characters and the string length get reduced by the length of the deleted prefix). 

Note that both steps are mandatory in each operation, and their order cannot be changed.

For example, if you have a string $s =$ 111010, the first operation can be one of the following:  select $i = 1$: we'll get 111010 $\rightarrow$ 11010 $\rightarrow$ 010;  select $i = 2$: we'll get 111010 $\rightarrow$ 11010 $\rightarrow$ 010;  select $i = 3$: we'll get 111010 $\rightarrow$ 11010 $\rightarrow$ 010;  select $i = 4$: we'll get 111010 $\rightarrow$ 11110 $\rightarrow$ 0;  select $i = 5$: we'll get 111010 $\rightarrow$ 11100 $\rightarrow$ 00;  select $i = 6$: we'll get 111010 $\rightarrow$ 11101 $\rightarrow$ 01. 

You finish performing operations when the string $s$ becomes empty. What is the maximum number of operations you can perform?


-----Input-----

The first line contains a single integer $t$ ($1 \le t \le 1000$) — the number of test cases.

The first line of each test case contains a single integer $n$ ($1 \le n \le 2 \cdot 10^5$) — the length of the string $s$.

The second line contains string $s$ of $n$ characters. Each character is either 0 or 1.

It's guaranteed that the total sum of $n$ over test cases doesn't exceed $2 \cdot 10^5$.


-----Output-----

For each test case, print a single integer — the maximum number of operations you can perform.


-----Example-----
Input
5
6
111010
1
0
1
1
2
11
6
101010

Output
3
1
1
1
3



-----Note-----

In the first test case, you can, for example, select $i = 2$ and get string 010 after the first operation. After that, you can select $i = 3$ and get string 1. Finally, you can only select $i = 1$ and get empty string.

```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 = "import sys, math\nimport io, os\n#data = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline\nfrom bisect import bisect_left as bl, bisect_right as br, insort\nfrom heapq import heapify, heappush, heappop\nfrom collections import defaultdict as dd, deque, Counter\n#from itertools import permutations,combinations\ndef data(): return sys.stdin.readline().strip()\ndef mdata(): return list(map(int, data().split()))\ndef outl(var) : sys.stdout.write('\\n'.join(map(str, var))+'\\n')\ndef out(var) : sys.stdout.write(str(var)+'\\n')\n#from decimal import Decimal\n#from fractions import Fraction\n#sys.setrecursionlimit(100000)\nINF = float('inf')\nmod=10**9+7\n\n\nfor t in range(int(data())):\n    n=int(data())\n    s=data()\n    ind=0\n    l=[]\n    for i in range(1,n):\n        if s[i]!=s[i-1]:\n            l.append(i-ind)\n            ind=i\n    l.append(n-ind)\n    l=l[::-1]\n    i=0\n    ans=0\n    j=len(l)-1\n    while l:\n        if l[-1]>1:\n            ans+=1\n            l.pop()\n            j-=1\n        else:\n            j=min(j,len(l)-1)\n            while j>=0 and l[j]==1:\n                j-=1\n            if j==-1:\n                l.pop()\n                if l:\n                    l.pop()\n            else:\n                l.pop()\n                l[j]-=1\n            ans+=1\n    out(ans)"
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 15149