#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e5 + 20;
int n;
int cnt[200];
void solve() {
  int ans = 0;
  int p = 0;
  while (cnt[p] >= 2) {
    p++;
  }
  ans += p;
  while (cnt[p] >= 1) {
    p++;
  }
  ans += p;
  printf("%d\n", ans);
}
int main() {
  int test;
  scanf("%d", &test);
  while (test--) {
    int x;
    memset(cnt, 0, sizeof(cnt));
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
      scanf("%d", &x);
      cnt[x]++;
    }
    solve();
  }
}
