#include <bits/stdc++.h>
using namespace std;
int t;
int n, x, v[105], nr1, nr2;
int main() {
  cin >> t;
  ++t;
  while (--t) {
    cin >> n;
    for (int i = 0; i <= 100; ++i) v[i] = 0;
    for (int i = 1; i <= n; ++i) {
      cin >> x;
      v[x]++;
    }
    nr1 = nr2 = -1;
    for (int i = 0; i <= 100 && nr2 == -1; ++i) {
      if (v[i] == 1 && nr1 == -1) nr1 = i;
      if (v[i] == 0) {
        nr2 = i;
        if (nr1 == -1) nr1 = i;
      }
    }
    cout << nr1 + nr2 << '\n';
  }
  return 0;
}
