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.

import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Stack;
import java.util.TreeMap;

public class Round659 {

	static int rec = 0;
	static int X[] = { -1, 0, 0, 1 };
	static int Y[] = { 0, -1, 1, 0 };
	static long mod = 1000000007;
	static int last = 0;
	static int maxDepth = 0;

	static class Reader {
		final private int BUFFER_SIZE = 1 << 16;
		private DataInputStream din;
		private byte[] buffer;
		private int bufferPointer, bytesRead;

		public Reader() {
			din = new DataInputStream(System.in);
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public Reader(String file_name) throws IOException {
			din = new DataInputStream(new FileInputStream(file_name));
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public String readLine() throws IOException {
			byte[] buf = new byte[64]; // line length
			int cnt = 0, c;
			while ((c = read()) != -1) {
				if (c == '\n')
					break;
				buf[cnt++] = (byte) c;
			}
			return new String(buf, 0, cnt);
		}

		public int nextInt() throws IOException {
			int ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do {
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');

			if (neg)
				return -ret;
			return ret;
		}

		public long nextLong() throws IOException {
			long ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do {
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');
			if (neg)
				return -ret;
			return ret;
		}

		public double nextDouble() throws IOException {
			double ret = 0, div = 1;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();

			do {
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');

			if (c == '.') {
				while ((c = read()) >= '0' && c <= '9') {
					ret += (c - '0') / (div *= 10);
				}
			}

			if (neg)
				return -ret;
			return ret;
		}

		private void fillBuffer() throws IOException {
			bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
			if (bytesRead == -1)
				buffer[0] = -1;
		}

		private byte read() throws IOException {
			if (bufferPointer == bytesRead)
				fillBuffer();
			return buffer[bufferPointer++];
		}

		public void close() throws IOException {
			if (din == null)
				return;
			din.close();
		}
	}

	public static long[] initArray(int n, Reader scan) throws IOException {

		long arr[] = new long[n];
		for (int i = 0; i < n; i++) {
			arr[i] = scan.nextLong();
		}

		return arr;
	}

	public static long sum(long arr[]) {

		long sum = 0;
		for (long i : arr) {
			sum += (long) i;
		}

		return sum;
	}

	public static long max(long arr[]) {

		long max = Long.MIN_VALUE;

		for (long i : arr) {
			max = Math.max(i, max);
		}

		return max;
	}

	public static long min(long arr[]) {
		long min = Long.MAX_VALUE;

		for (long i : arr) {
			min = Math.min(i, min);
		}

		return min;
	}
	
	public static int[] intArray(int n, Reader scan) throws IOException {
		
		int arr[]=new int[n];
		
		for(int i=0;i<n;i++) {
			arr[i]=scan.nextInt();
		}
		
		return arr;
		
	}

	public static List<Integer>[] initAdjacency(int n, int e, Reader scan, boolean type) throws IOException {

		List<Integer> adj[] = new ArrayList[n + 1];

		for (int i = 0; i < e; i++) {
			int u = scan.nextInt();
			int v = scan.nextInt();

			if (adj[u] == null)
				adj[u] = new ArrayList<>();
			if (type && adj[v] == null)
				adj[v] = new ArrayList<>();

			adj[u].add(v);

			if (type)
				adj[v].add(u);

		}

		return adj;
	}
	
	public static int[] nextGreater(int arr[]) {
		
		int n=arr.length;
		int nextGreater[] = new int[n];

		Stack<Integer> stack = new Stack<>();

		for (int i = 0; i < n; i++) {

			while (!stack.isEmpty()) {

				if (arr[i] >= arr[stack.peek()]) {
					nextGreater[stack.pop()] = i;
				} else {
					break;
				}

			}

			stack.push(i);

		}

		while (!stack.isEmpty()) {
			nextGreater[stack.pop()] = n;
		}
		
		return nextGreater;

	}
	
	public static int[] nextGreater(long arr[]) {
		
		int n=arr.length;
		int nextGreater[] = new int[n];

		Stack<Integer> stack = new Stack<>();

		for (int i = 0; i < n; i++) {

			while (!stack.isEmpty()) {

				if (arr[i] >= arr[stack.peek()]) {
					nextGreater[stack.pop()] = i;
				} else {
					break;
				}

			}

			stack.push(i);

		}

		while (!stack.isEmpty()) {
			nextGreater[stack.pop()] = n;
		}
		
		return nextGreater;

	}
	
	public static int[] nextSmaller(int[] arr) {
		int n=arr.length;
		
		Stack<Integer> stack=new Stack<>();
		int nextSmaller[] = new int[n];

		for (int i = 0; i < n; i++) {

			while (!stack.isEmpty()) {

				if (arr[i] <= arr[stack.peek()]) {
					nextSmaller[stack.pop()] = i;
				} else {
					break;
				}

			}

			stack.push(i);

		}

		while (!stack.isEmpty()) {
			nextSmaller[stack.pop()] = n;
		}

		return nextSmaller;
	}
	
	public static int[] nextSmaller(long[] arr) {
		int n=arr.length;
		
		Stack<Integer> stack=new Stack<>();
		int nextSmaller[] = new int[n];

		for (int i = 0; i < n; i++) {

			while (!stack.isEmpty()) {

				if (arr[i] <= arr[stack.peek()]) {
					nextSmaller[stack.pop()] = i;
				} else {
					break;
				}

			}

			stack.push(i);

		}

		while (!stack.isEmpty()) {
			nextSmaller[stack.pop()] = n;
		}

		return nextSmaller;
	}

	public static void main(String[] args) throws IOException {

		Reader scan = new Reader();
//		Scanner scan = new Scanner(System.in);

		int t = scan.nextInt();
		while (t-- > 0) {

			int n=scan.nextInt();
			
//			long arr[]=initArray(n, scan);
			int arr[]=intArray(n, scan);
			
			A(n, arr);
		}

	}

	public static void A(int n, int arr[]) {
		
		
		int count[]=new int[102];
		
		for(int i: arr) {
			count[i]++;
		}
		
		
		int first=0;
		
		for(int i=0;i<count.length;i++) {
			if(count[i]<2) {
				if(count[i]==0) {
					System.out.println(2*i);
					return;
				}
				
				first=i;
				break;
			}
		}
		
		for(int i=first+1;i<count.length;i++) {
			if(count[i]==0) {
				first+=i;
				break;
			}
		}
		
		System.out.println(first);
		
	}

}

class Range {

	public long rangeMax[][];
	public long rangeMin[][];

	public int indexMax[][];
	public int indexMin[][];

	public Range(long arr[]) {

		double hi = Math.ceil(Math.log(arr.length) / Math.log(2));
		// System.out.println("hi="+hi);
		rangeMax = new long[arr.length][(int) hi + 1];
		rangeMin = new long[arr.length][(int) hi + 1];
		indexMax = new int[arr.length][(int) hi + 1];
		indexMin = new int[arr.length][(int) hi + 1];
		for (int i = 0; i < arr.length; i++) {
			rangeMax[i][0] = arr[i];
			rangeMin[i][0] = arr[i];

			indexMax[i][0] = i;
			indexMin[i][0] = i;
		}

		for (int len = 2, j = 1; len <= arr.length; len *= 2, j++) {

			for (int i = 0; i < arr.length; i++) {

				if (i + len / 2 >= arr.length) {
					rangeMax[i][j] = rangeMax[i][j - 1];
					rangeMin[i][j] = rangeMin[i][j - 1];

					indexMax[i][j] = indexMax[i][j - 1];

					indexMin[i][j] = indexMin[i][j - 1];
					continue;
				}

				rangeMax[i][j] = Math.max(rangeMax[i][j - 1], rangeMax[i + len / 2][j - 1]);
				rangeMin[i][j] = Math.min(rangeMin[i][j - 1], rangeMin[i + len / 2][j - 1]);

				indexMax[i][j] = indexMax[i + len / 2][j - 1];

				indexMin[i][j] = indexMin[i + len / 2][j - 1];

				if (rangeMax[i][j] == rangeMax[i][j - 1]) {
					indexMax[i][j] = indexMax[i][j - 1];
				}

				if (rangeMin[i][j] == rangeMin[i][j - 1]) {
					indexMin[i][j] = indexMin[i][j - 1];
				}

			}

		}

	}

	public int getMax(int l, int r) {

		if (l > r)
			return -1;

		int len = r - l + 1;
		long ans = Long.MIN_VALUE;
		int index = l;
		int cur = l;
		while (len != 0) {
			int val = (int) (Math.log(len) / Math.log(2));
			len -= (1 << val);
			long maxVal = Math.max(ans, rangeMax[cur][val]);

			if (maxVal > ans) {
				index = indexMax[cur][val];
			}

			ans = maxVal;
			cur += (1 << val);
		}

		return index;

	}

	public int getMin(int l, int r) {

		if (l > r)
			return -1;

		int len = r - l + 1;
		long ans = Long.MAX_VALUE;
		int cur = l;
		int index = l;
		while (len != 0) {
			int val = (int) (Math.log(len) / Math.log(2));
			len -= (1 << val);
			long minVal = Math.min(ans, rangeMin[cur][val]);

			if (minVal < ans) {
				index = indexMin[cur][val];
			}

			ans = minVal;

			cur += (1 << val);
		}

		return index;
	}

}

class MyPair {

	int value;
	int weight;

	public MyPair(int value, int w) {
		this.value = value;
		weight = w;
	}

}