#include <bits/stdc++.h>
using namespace std;
long long arr[101], N, T;
void Input() {
  cin >> N;
  memset(arr, 0, sizeof arr);
  for (int i = 0; i < N; i++) {
    long long tmp;
    cin >> tmp;
    arr[tmp]++;
  }
}
void Solve() {
  int one = 0, two = 0;
  for (int i = 0; i <= 100; i++) {
    if (arr[i] >= 2 && one == two) {
      one++;
      two++;
    } else if (arr[i] >= 1) {
      one++;
    } else {
      break;
    }
  }
  cout << one + two << '\n';
}
int main() {
  cin >> T;
  for (int i = 0; i < T; i++) {
    Input();
    Solve();
  }
}
