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