#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int t, x, n;
  cin >> t;
  while (t--) {
    cin >> n;
    vector<int> v(109, 0);
    while (n--) {
      cin >> x;
      v[x] += 1;
    }
    int sum = 0;
    for (int i = 0; i < v.size(); i++) {
      if (v[i] == 0) {
        sum += i;
        break;
      }
    }
    for (int i = 0; i < v.size(); i++) {
      if (v[i] <= 1) {
        sum += i;
        break;
      }
    }
    cout << sum << "\n";
  }
  return 0;
}
