#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  int m[101] = {0};
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    m[x]++;
  }
  int ans = 0;
  for (int i = 0; i < 101; i++) {
    if (m[i] != 0) {
      m[i]--;
    } else {
      ans = ans + i;
      break;
    }
  }
  for (int i = 0; i < 101; i++) {
    if (m[i] != 0) {
      m[i]--;
    } else {
      ans = ans + i;
      break;
    }
  }
  cout << ans << endl;
  return;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
