#include <bits/stdc++.h>

using namespace std;

signed main()
{
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);
    int T=1;cin>>T;
   	while(T--)
    {
    	int n;cin>>n;
    	int B[n+2];for(int i=1;i<=n;i++)cin>>B[i];B[0]=0;B[n+1]=2*n+1;
    	int ext=0;
    	int mini=0, maxi=n;
    	for(int i=1;i<=n;i++)
    	{
    		ext+=B[i]-B[i-1]-1;
    		if(ext)
    		{
    			maxi--;ext--;
			}
		}
		ext=0;
		for(int i=n;i>=1;i--)
		{
			ext+=B[i+1]-B[i]-1;
			if(ext)
			{
				mini++;ext--;
			}
		}
		//cout<<mini<<" to "<<maxi<<endl;
		cout<<abs(maxi-mini)+1<<endl;
    }
}