#include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
using lli = long long int;
const int INF = 1e9;
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n;
    scanf("%d", &n);
    vector<int> marc(110);
    for (int i = 0; i < n; ++i) {
      int x;
      scanf("%d", &x);
      ++marc[x];
    }
    int maxi = -1;
    for (int i = 0; i <= 100 && marc[i]; ++i) {
      --marc[i], maxi = i;
    }
    int maxi2 = -1;
    for (int i = 0; i <= 100 && marc[i]; ++i) {
      --marc[i], maxi2 = i;
    }
    printf("%d\n", maxi + 1 + maxi2 + 1);
  }
}
