#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, i, j;
  cin >> n;
  int a[n];
  vector<long long> s1;
  vector<long long> s2;
  vector<long long> f(101);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    f[a[i]]++;
  }
  for (int i = 0; i < 101; i++) {
    if (f[i] > 1) {
      s1.push_back(i);
      s2.push_back(i);
    } else if (f[i] == 1) {
      s2.push_back(i);
    }
  }
  for (i = 0; i < s1.size(); i++) {
    if (i != s1[i]) {
      break;
    }
  }
  for (j = 0; j < s2.size(); j++) {
    if (j != s2[j]) {
      break;
    }
  }
  cout << i + j << endl;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
