I=input for t in [0]*int(I()): N=I() A=sorted(map(int,I().split())) a,b=A[-1],sum(A[:-1]) print([a+b,b*2+1][b