
#include<iostream>
#include<fstream>
#include<vector>
#include<map>
#include<algorithm>
#include<set>
#include <cmath>
#include<string.h>
#include <stdio.h>
#include <unordered_map>
#include <queue>
#include<climits>
#include <iomanip>
#include<iostream>
#include<fstream>
#include<vector>
#include<map>
#include<algorithm>
#include<set>
#include <cmath>
#include<string.h>
#include <stdio.h>
#include <unordered_map>
#include <queue>
#include<climits>
#include <iomanip>
#include <unordered_set>




using namespace std;
#define ll long long
#define clr(x) memset(x, 0, sizeof(x))
#define tcase ll t;cin>>t;while(t--)
#define all(v) v.begin(),v.end()
#define GCJ ll t;cin>>t;for(ll H=1;H<=t;H++){cout<<"CASE #"<<H<<": ";solve();}
#define fast ios_base::sync_with_stdio(0);cin.tie(0)
#define endl "\n"
//comment out the above line when coding probs which require flushing the output
#define prarr(a,n) for(ll i=0;i<n;i++){cout<<a[i]<<" ";}cout<<endl;
#define remDup(v) sort(all(v));v.resize(unique(all(v))-v.begin());
#define vi vector<ll>
#define pii pair<ll, ll>
#define vii vector<pii>
#define vvi vector<vector<ll > >
#define rep(i,n) for(ll i=0;i<n;i++)
#define crep(i,x,n) for(ll i=x;i<n;i++)
#define revrep(n,i) for(ll i=n-1;i>=0;i--)
#define crevrep(n,x,i) for(ll i=n-1;i>=x;i--)
#define ss second
#define ff first
#define incr(x,y) x=max(x, y)
#define decr(x,y) x=min(x, y)
#define pb push_back
void USACO(string s){fast;freopen((s+".in").c_str(),"r",stdin);freopen((s+".out").c_str(),"w",stdout);}

const int MAXN=100000;

int n;

int ans(vi a, vi b)
{
    int ret=0;

    int ptr=0;
    rep(i,n)
    {
        while(b[ptr]<a[i]&&ptr<n)
        {
            ptr++;
        }
        if(ptr<n)
        {
            ret=i+1;
            ptr++;
        }
        else
        {
            break;
        }

    }

    return ret;

}


void solve()
{
    //USACO("taming");


    cin>>n;

    vi a,b;
    map<int,int>ok;

    rep(i,n)
    {
        int x;
        cin>>x;
        a.pb(x);
        ok[x]=true;
    }

    crep(i,1,(2*n)+1)
    {
        if(!ok[i])
        {
            b.pb(i);
        }
    }
   // cout<<ans(a,b)<<" "<<ans(b,a)<<endl;

    cout<<ans(a,b)-(n-ans(b,a))+1<<endl;
    //cout<<abs(ans(a,b)-ans(b,a))+1<<endl;







}






int main()
{
    tcase
        solve();
}
















