#include <bits/stdc++.h>
using namespace std;
int main() {
  int tt;
  cin >> tt;
  int vect[101];
  while (tt--) {
    int n;
    cin >> n;
    for (int i = 0; i < 101; ++i) {
      vect[i] = 0;
    }
    for (int i = 0; i < n; ++i) {
      int temp;
      cin >> temp;
      vect[temp]++;
    }
    int ans = 0;
    for (int i = 0; i < 101; ++i) {
      if (vect[i] == 0 or vect[i] == 1) {
        ans += i;
        break;
      }
    }
    for (int i = 0; i < 101; ++i) {
      if (vect[i] == 0) {
        ans += i;
        break;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
