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