The chef is having one array of natural numbers. Cheffina challenges chef that find the sum of weights all the natural numbers present in the array, but the main problem is that all numbers have not original weights. After every 6 natural numbers weight is set to 1 as weight increases by 1 after that. (i.e. weight of 1 is 1, weight of 2 is 2 but the weight of 7 is 1 and weight of 8 is 2 and so on…). Help the chef to find the sum. 

-----Input:-----
- First line will contain $T$, number of testcases. Then the testcases follow. 
- Each testcase contains two lines of input, one integer $N$.
- Next line has N space separate natural numbers. 

-----Output:-----
For each testcase, output in a single line answer.

-----Constraints-----
- $1 \leq T \leq 10$
- $1 \leq N \leq 10^5$
- $1 \leq arr[i] \leq 10^6$

-----Sample Input:-----
1
6
6 7 9 11 4 16

-----Sample Output:-----
23

-----EXPLANATION:-----
Array after conversion = [6, 1, 3, 5, 4, 4]

Source: codechef | Difficulty: UNKNOWN_DIFFICULTY


Solutions:
t = int(input())
while t:
	x = int(input())
	arr = [int(i) for i in input().split()]
	total = 0
	for i in arr:
		if i % 6 == 0:
			total += 6
		else:
			total += i % 6
	print(total)
	t -= 1


import sys
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(int(input())):
	k = int(input())
	a = list(map(int, input().split()))
	for i in range(len(a)):
		if a[i] % 6 != 0:
			a[i] = a[i] % 6
		elif a[i] % 6 == 0:
			a[i] = 6
	print(sum(a))


n = int(input())
for _ in range(n):
	m = int(input())
	lis = list(map(int, input().strip().split()))
	res = []
	for ele in lis:
		if ele % 6 == 0:
			res.append(6)
		res.append(ele % 6)
	print(sum(res))


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	s = 0
	for i in l:
		if i % 6 == 0:
			s += 6
		else:
			s += i % 6
	print(s)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	res = 0
	for _ in range(n):
		if a[_] % 6 == 0:
			res += 6
		else:
			res += a[_] % 6
	print(res)


t = int(input())
for i in range(0, t):
	n = int(input())
	s = 0
	l = list(map(int, input().split()))
	for j in l:
		if j % 6 == 0:
			s += 6
		else:
			r = j % 6
			s += r
	print(s)


for _ in range(int(input())):
	n = input()
	ar = list(map(int, input().split()))
	ans = 0
	for i in ar:
		if i % 6 == 0:
			ans += 6
		else:
			ans += i % 6
	print(ans)


def six(n):
	return 1 + (n - 1) % 6

def f(numbers):
	return sum(list(map(six, numbers)))
t = int(input())
answers = list()
for _ in range(t):
	throw = int(input())
	array = list(map(int, input().split()))
	answers.append(f(array))
for answer in answers:
	print(answer)


t = int(input())
for _ in range(t):
	a = int(input())
	b = list(map(int, input().split()))
	s = 0
	for i in b:
		if i % 6 != 0:
			s += i % 6
		else:
			s += 6
	print(s)


import sys
from math import log2
from itertools import combinations
for _ in range(int(sys.stdin.readline())):
	n = int(sys.stdin.readline())
	lis = list(map(int, sys.stdin.readline().split()))
	for i in range(len(lis)):
		if lis[i] % 6 == 0:
			lis[i] = 6
		else:
			lis[i] = lis[i] % 6
	print(sum(lis))


t = int(input())
for _ in range(t):
	n = int(input())
	ll = list(map(int, input().split()))
	ss = 0
	for ele in ll:
		if ele <= 6:
			ss += ele
		else:
			zz = ele % 6
			if zz == 0:
				ss += 6
			else:
				ss += zz
	print(ss)


testcases = int(input())
for x in range(testcases):
	size = int(input())
	li = list(map(int, input().split()))
	li2 = [n - 6 * (n // 6) if n % 6 != 0 else 6 for n in li]
	print(sum(li2))


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	for i in range(n):
		l[i] = l[i] % 6
		if l[i] == 0:
			l[i] = 6
	ans = sum(l)
	print(ans)


for i in range(int(input())):
	N = int(input())
	Arr = list(map(int, input().split()))
	ans = 0
	for i in Arr:
		if i % 6 == 0:
			ans += 6
		else:
			ans += i - int(i / 6) * 6
	print(ans)


n = int(input())
for _ in range(n):
	k = int(input())
	a = [int(i) for i in input().split()]
	sum = 0
	for i in range(k):
		if a[i] % 6 == 0:
			sum += 6
			continue
		a[i] = a[i] % 6
		sum += a[i]
	print(sum)


n = int(input())
for _ in range(n):
	n1 = int(input())
	ans = 0
	l = input().split()
	for i in l:
		if int(i) % 6 == 0:
			ans += 6
		else:
			ans += int(i) % 6
	print(ans)


t = int(input())
for i in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	for i in range(n):
		if arr[i] % 6 == 0:
			arr[i] = 6
		else:
			arr[i] = arr[i] % 6
	print(sum(arr))


for t in range(int(input())):
	N = int(input())
	arr = list(map(int, input().split()))
	ans = 0
	for i in range(len(arr)):
		if arr[i] % 6 == 0:
			ans += 6
		else:
			ans += arr[i] % 6
	print(ans)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	s = 0
	for x in a:
		s += x % 6
		if x % 6 == 0:
			s += 6
	print(s)


for _ in range(int(input())):
	n = int(input())
	arr1 = list(set(map(int, input().split())))
	sum = 0
	for i in arr1:
		if i % 6 == 0:
			sum += 6
		else:
			sum += i % 6
	print(sum)


for _ in range(int(input())):
	n = int(input())
	arr = list(map(lambda x: int(x) % 6, input().split()))
	ans = sum(arr)
	ans += 6 * arr.count(0)
	print(ans)