#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t = 1;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    long long int a[n], b[102] = {0};
    for (long long int i = 0; i < n; i++) {
      cin >> a[i];
      b[a[i]]++;
    }
    long long int m = 0;
    for (long long int i = 0; i < 102; i++) {
      if (b[i] == 0) {
        m += i;
        break;
      }
      b[i]--;
    }
    for (long long int i = 0; i < 102; i++) {
      if (b[i] == 0) {
        m += i;
        break;
      }
      b[i]--;
    }
    cout << m << endl;
  }
  return 0;
}
