Chef has a binary string S of length N. Chef can perform the following operation on S:
Insert any character (0 or 1) at any position in S.

Find the minimum number of operations Chef needs to perform so that no two consecutive characters are same in S.

------ Input Format ------ 

- The first line contains a single integer T — the number of test cases. Then the test cases follow.
- The first line of each test case contains an integer N — the length of the binary string S.
- The second line of each test case contains a binary string S of length N containing 0s and 1s only.

------ Output Format ------ 

For each test case, output on a new line the minimum number of operations Chef needs to perform so that no two consecutive characters are same in S.

------ Constraints ------ 

$1 ≤ T ≤ 100$
$1 ≤N ≤1000$

----- Sample Input 1 ------ 
3
2
11
4
0101
5
00100

----- Sample Output 1 ------ 
1
0
2

----- explanation 1 ------ 
Test case 1: We can perform the following operations: $11 \rightarrow 1\underline{0}1$.

Test case 2: We do not need to perform any operations.

Test case 3: We can perform the following operations: $00100 \rightarrow 0\underline{1}0100 \rightarrow 01010\underline{1}0$.

Difficulty: EASY

Solutions:
c = 0
for i in range(int(input())):
	a = int(input())
	b = input()
	for i in range(a - 1):
		if b[i] == b[i + 1]:
			c += 1
	print(c)
	c = 0


for i in range(int(input())):
	c = 0
	n = int(input())
	s = input()
	for i in range(n - 1):
		if s[i] == s[i + 1]:
			c += 1
	print(c)


for t in range(int(input())):
	c = 0
	n = int(input())
	S = input()
	for i in range(n - 1):
		if S[i] == S[i + 1]:
			c += 1
	print(c)


for i in range(0, int(input())):
	x = int(input())
	n = str(input())
	t = n
	i = 0
	j = 1
	c = 0
	while i < len(n) and j < len(n):
		if n[i] == n[j]:
			c = c + 1
		i = i + 1
		j = j + 1
	print(c)


T = int(input())
X = []
for _ in range(T):
	N = int(input())
	S = input()
	c = 0
	for i in range(N - 1):
		if S[i] == S[i + 1]:
			c += 1
	X.append(c)
print(*X, sep='\n')


def min_operations(n, s):
	count = 0
	for i in range(1, n):
		if s[i] == s[i - 1]:
			count += 1
	return count
t = int(input())
for _ in range(t):
	n = int(input())
	s = input().strip()
	ans = min_operations(n, s)
	print(ans)


t = int(input())
for _ in range(t):
	n = int(input())
	strs = input()
	c0 = 0
	c1 = 0
	for i in range(len(strs) - 1):
		if strs[i] == '0' and strs[i + 1] == '0':
			c0 += 1
		elif strs[i] == '1' and strs[i + 1] == '1':
			c1 += 1
	print(c0 + c1)


for i in range(int(input())):
	n = int(input())
	s = input()
	count = 0
	for x in range(1, n):
		if s[x - 1] == '0' and s[x] == '0':
			count += 1
		elif s[x - 1] == '1' and s[x] == '1':
			count += 1
	print(count)


t = int(input())
for i in range(t):
	n = int(input())
	s = input()
	count = 0
	for i in range(n - 1):
		if s[i] == s[i + 1]:
			count += 1
	print(count)


T = int(input())
for i in range(T):
	N = int(input())
	B = input()
	count = 0
	for i in range(N - 1):
		if B[i] == B[i + 1]:
			count += 1
		else:
			count += 0
	print(count)


tc = int(input())
for _ in range(tc):
	n = int(input())
	s = input()
	ones = s.count('1')
	zeroes = n - ones
	changes = 0
	for i in range(n - 1):
		changes += int(s[i]) ^ int(s[i + 1]) != 1
	print(changes)


t = int(input())
for _ in range(t):
	n = int(input())
	arr = input().strip()
	count = 0
	for i in range(n - 1):
		if arr[i] == arr[i + 1]:
			count += 1
	print(count)


for _ in range(int(input())):
	n = int(input())
	s = input()
	count = 0
	for index in range(n - 1):
		if s[index] == s[index + 1]:
			count += 1
	print(count)


for i in range(int(input())):
	n = int(input())
	a = input()
	c = 0
	for j in range(n - 1):
		if a[j] == a[j + 1]:
			c += 1
	print(c)


T = int(input())
for i in range(T):
	C = 0
	N = int(input())
	S = input()
	for j in range(0, N - 1):
		if S[j] == S[j + 1]:
			C += 1
	print(C)


t = int(input())
while t > 0:
	n = int(input())
	s = input()
	c = 0
	if len(s) == n:
		for i in range(0, len(s) - 1):
			if s[i] == s[i + 1]:
				c += 1
		print(c)
	t -= 1


t = int(input())
while t > 0:
	count = 0
	size = int(input())
	str = input()
	for i in range(size - 1):
		if str[i] == str[i + 1]:
			count += 1
	print(count)
	t -= 1


for _ in range(int(input())):
	f = 0
	n = int(input())
	s = input()
	for i in range(n - 1):
		f += s[i] == s[i + 1]
	print(f)


t = int(input())
while t:
	n = int(input())
	l1 = input()
	count = 0
	for i in range(n - 1):
		if l1[i] == l1[i + 1]:
			count += 1
	print(count)
	t -= 1


x = []
for i in range(int(input())):
	n = int(input())
	a = input()
	count = 0
	for i in range(n - 1):
		if a[i] == a[i + 1]:
			count += 1
	print(count)


t = int(input())
for i in range(t):
	n = int(input())
	num = input()
	count = 0
	for i in range(1, n):
		if num[i - 1] == num[i]:
			count += 1
			flag = num[i]
	print(count)


for i in range(int(input())):
	c = 0
	l = int(input())
	a = str(input())
	for j in range(l - 1):
		if a[j] == a[j + 1]:
			c += 1
	print(c)