Given a set of integers (it can contain equal elements).

You have to split it into two subsets A and B (both of them can contain equal elements or be empty). You have to maximize the value of mex(A)+mex(B).

Here mex of a set denotes the smallest non-negative integer that doesn't exist in the set. For example: 

  * mex(\{1,4,0,2,2,1\})=3 
  * mex(\{3,3,2,1,3,0,0\})=4 
  * mex(∅)=0 (mex for empty set) 



The set is splitted into two subsets A and B if for any integer number x the number of occurrences of x into this set is equal to the sum of the number of occurrences of x into A and the number of occurrences of x into B.

Input

The input consists of multiple test cases. The first line contains an integer t (1≤ t≤ 100) — the number of test cases. The description of the test cases follows.

The first line of each test case contains an integer n (1≤ n≤ 100) — the size of the set.

The second line of each testcase contains n integers a_1,a_2,... a_n (0≤ a_i≤ 100) — the numbers in the set.

Output

For each test case, print the maximum value of mex(A)+mex(B).

Example

Input


4
6
0 2 1 5 0 1
3
0 1 2
4
0 2 0 1
6
1 2 3 4 5 6


Output


5
3
4
0

Note

In the first test case, A=\left\{0,1,2\right\},B=\left\{0,1,5\right\} is a possible choice.

In the second test case, A=\left\{0,1,2\right\},B=∅ is a possible choice.

In the third test case, A=\left\{0,1,2\right\},B=\left\{0\right\} is a possible choice.

In the fourth test case, A=\left\{1,3,5\right\},B=\left\{2,4,6\right\} is a possible choice.
1
100
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
 15
1
0
1
1
2
0 0
2
0 1
2
1 1
2
0 2
2
1 2
3
0 0 0
3
0 1 0
3
0 1 2
4
0 1 2 3
4
1 1 2 3
4
0 1 0 1
4
0 0 0 1
5
0 0 0 0 0

100
 1
0
2
2
0
1
0
2
3
3
4
0
4
3
2

from collections import deque
from collections import OrderedDict
import math
 
import sys
import os
import threading
import bisect
 
import operator
 
import heapq
 
 
from atexit import register
from io import BytesIO
 
#sys.stdin = BytesIO(os.read(0, os.fstat(0).st_size))
#sys.stdout = BytesIO()
#register(lambda: os.write(1, sys.stdout.getvalue()))
 
 
import io
#input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline


from sys import stdin, stdout
#input = sys.stdin.readline
#input = stdin.buffer.readline
#print = stdout.write
#a = [int(x) for x in input().split()]


#import os,io
#input=io.BytesIO(os.read(0,os.fstat(0).st_size)).readline

import os
import sys
from io import BytesIO, IOBase

BUFSIZE = 8192
class FastIO(IOBase):
	newlines = 0
 
	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = "x" in file.mode or "r" not in file.mode
		self.write = self.buffer.write if self.writable else None
 
	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
		self.newlines = 0
		return self.buffer.read()
 
	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b"\n") + (not b)
			ptr = self.buffer.tell()
			self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
		self.newlines -= 1
		return self.buffer.readline()
 
	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			self.buffer.truncate(0), self.buffer.seek(0)
 
 
class IOWrapper(IOBase):
	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode("ascii"))
		self.read = lambda: self.buffer.read().decode("ascii")
		self.readline = lambda: self.buffer.readline().decode("ascii")
 
 
#sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

#sys.stdin = open("F:\PY\\test.txt", "r")
input = lambda: sys.stdin.readline().rstrip("\r\n")





    
for _ in range(int(input())):
    n = int(input())
    ar = list(map(int, input().split()))
    ar.sort()
    set1 = set()
    set2 = set()
    for i in range(n):
        if ar[i] not in set1:
            set1.add(ar[i])
            ar[i]=-1
    
    for i in range(n):
        if (ar[i] not in set2) and ar[i]!=-1:
            set2.add(ar[i])
    
    max1 = 0
    max2 = 0
    
    idx=0
    for i in set1:
        if i!=idx:
            max1=idx
            break
        idx+=1
    else:
        max1=idx
        
        
    idx=0
    for i in set2:
        if i!=idx:
            max2=idx
            break
        idx+=1
    else:
        max2=idx   
    
    
    print(max1+max2)
            
            
            
            
            
            
            
            
            
            
            
            
            
            
        





sys.exit(0)
n  = int(input())
lis = list(map(int, input().split()))
answer = 0
for i in range(n):
    answer+=lis[i]-1
if n==1:
    print(n-1)
elif n>32:
    print(answer)
    sys.exit(0)
lis.sort()
for i in range(2, 50000):
    localMin = 0
    for j in range(n):
        needVal = i**j
        localMin+=abs(lis[j]-needVal)
        if localMin>answer:
            break
    else:
        answer = min(localMin, answer)
print(answer)
     
                
    
        
    

'''
n = int(input())
lis = list(map(int, input().split()))
sumAr = 0
for i in range(n):
    sumAr+=lis[i]
k = (sumAr-(n*(n-1)//2))//n
dif = sumAr - (k*n+(n*(n-1)//2))

answer=[]
for i in range(n):
    if i<dif:
        print(k+i+1)
        #print(k+i+1, end=" ")
    else:
        print(k+i)
        #print(k+i, end=" ")

#print(*answer, sep=" ")
        
'''





sys.exit(0)

class Person:
    def __init__(self, name, age):
        self.name = name
        self.age = age

p1 = Person("heelo", 27)

print(help(Person))


age = 26
name = 'Swaroop'
print('Возрас {} -- {} лет'.format(name, age))
print(help(object))


'''
for _ in range(int(input())):
    
    n = int(input())
    ar = list(map(int, input().split()))
    dp = [0]*100005
    for i in range(n):
        dp[ar[i]]+=1
    ar.clear()
    for i in range(len(dp)):
        if dp[i]!=0:
            ar.append(dp[i])       
    ar.sort()
    maxC = ar[len(ar)-1]
    sumA = sum(ar)
    answer=0
    for i in range(len(ar)):
        if ar[i]==maxC:
            answer+=1
            sumA-=maxC
    answer-=1
    answer+= min(sumA//(maxC-1), len(ar)-1)
    print(answer)
    #sys.exit(0)   
         
    




def maxDisjointIntervals(list_):
    list_.sort(key=lambda x: x[1])
    print(list_[0][0], list_[0][1])
    r1 = list_[0][1]
    for i in range(1, len(list_)):
        l1 = list_[i][0]
        r2 = list_[i][1]
        if l1>r1:
            print(l1, r2)
            r1 = r2

if __name__ =="__main__1":
    N=4
    intervals = [[1, 4], [2, 3], [4,6], [8,9]]
    maxDisjointIntervals(intervals)
    
    '''
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    