#include <bits/stdc++.h>
using namespace std;
int a[110];
int b[110];
int main() {
  int t;
  cin >> t;
  while (t--) {
    memset(a, 0, sizeof(a));
    memset(b, 0, sizeof(b));
    int n;
    cin >> n;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
      b[a[i]]++;
    }
    int ans = 0;
    for (int i = 0; i < 110; i++) {
      if (b[i] == 0) {
        ans += i;
        break;
      }
      b[i]--;
    }
    for (int i = 0; i < 110; i++) {
      if (b[i] == 0) {
        ans += i;
        break;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
