#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  std::cin >> n;
  std::vector<int> v(101);
  for (int i = 0; i < n; ++i) {
    int temp;
    std::cin >> temp;
    v[temp]++;
  }
  int mex_A = -1;
  int mex_B = -1;
  bool flag1 = 1;
  for (int i = 0; i < n; ++i) {
    if (v[i] > 1 && flag1) {
      mex_A = mex_B = i;
    } else if (v[i] >= 1) {
      mex_A = i;
      flag1 = 0;
    } else if (v[i] == 0) {
      break;
    }
  }
  std::cout << ++mex_A + ++mex_B << "\n";
}
int main() {
  int x;
  cin >> x;
  while (x--) solve();
  return 0;
}
