#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
const long long LINF = 1LL << 50;
const int NIL = -1;
const int MAX = 10000;
const int mod = 1000000007;
const double pi = 3.141592653589;
void solve() {
  int n;
  cin >> n;
  vector<int> cnt(101, 0);
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    cnt[a]++;
  }
  int ans = 0;
  for (int k = 0; k < 2; k++) {
    for (int i = 0; i <= 100; i++) {
      if (cnt[i] >= 1) {
        cnt[i]--;
      } else {
        ans += i;
        break;
      }
    }
  }
  cout << ans << '\n';
}
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) solve();
}
