#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    int n;
    cin >> n;
    vector<int> arr(101, 0);
    for (int j = 0; j < n; j++) {
      int temp;
      cin >> temp;
      arr[temp]++;
    }
    int count1 = 0, count2 = 0, flag = 0;
    for (int j = 0; j < n; j++) {
      if (arr[j] == 0) {
        cout << count1 + count2 << endl;
        break;
      }
      if (arr[j] > 0) {
        if (arr[j] >= 2 && flag == 0) {
          count1 = j + 1;
          count2 = j + 1;
        }
        if (arr[j] == 1 || flag == 1) {
          count1 = j + 1;
          flag = 1;
        }
      }
      if (j == n - 1) {
        cout << count1 + count2 << endl;
        break;
      }
    }
  }
}
