It is Jawa's birthday today. His each friend tells him the least number of toffees he wants. Later, his friends together decided that if he is able to satisfy the condition of atleast one of his friends than they will buy him a $1000 gift.
You have to help Jawa to decide the minimum number of toffees he need to buy to satisfy his friends conditions. This minimum number of toffees in any possible distribution should satisfy his friends condition.      

Input: 
First line contains a single integer T denoting number of test cases.
First line of each test case contains a single integer N denoting number of his friends.
Second line of each test case contains N space separated integers denoting the least number of toffees his each friend want.  

Output: 
For each test case output single integer denoting minimum number of toffees he needs to buy to satisfy the condition.    

Constraints:
1 ≤ T ≤ 10
1 ≤ N ≤ 100000
1 ≤ Ai ≤ 1000000000   

SAMPLE INPUT
2
3
8 6 9
1
4

SAMPLE OUTPUT
21
4
import sys
t=input()
for _ in range(t):
    n=input()
    arr = map(int,sys.stdin.readline().split(' '))
    ans=sum(arr)
    print ans+1-n