#include <bits/stdc++.h>
using namespace std;
int M = 1000000007;
long long n, m;
void solve() {}
void test() {
  long long n;
  cin >> n;
  vector<int> a(n);
  int count[101] = {
      0,
  };
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    count[a[i]]++;
  }
  bool flag = 1;
  int ans = 0;
  for (long long i = 0; i < 101; i++) {
    if (count[i] == 0 && flag) {
      cout << 2 * i << endl;
      return;
    }
    if (count[i] == 1 && flag) {
      ans += i;
      flag = 0;
    }
    if (count[i] == 0 && !flag) {
      ans += i;
      cout << ans << endl;
      return;
    }
  }
}
int main() {
  long long t;
  cin >> t;
  while (t--) test();
  return 0;
}
