It's NIT Kurukshetra's annual Sports Day.
Kunal has participated in a special kind of race having N Checkpoints in a straight line and he has to cover
all those Checkpoints in a particular order to finish the race. Each Checkpoint has a number written on it ranging
from 1 to N and all the Checkpoints are distinct.
The manner in which the race has to be followed is that Kunal has to start from the Checkpoint No. 1 and from there to
Checkpoint No. 2 and then to Checkpoint No.3 and so on till he reaches the Checkpoint No. N.
The distance between two consecutive checkpoints is 1.
Now Kunal wants to train accordingly so before starting the race he wants to know the total distance he has to cover so that he is able to finish the race.
Input:
The first line of input contains T i.e number of test cases.
The first line of each test case will contain N denoting the number of checkpoints.
The next line will contain N distinct numbers ranging from 1 to N where the ith number denotes the number written on Checkpointi.
Output:
The output should contain T lines.
Each line should contain the total distance Kunal has to run in the race.
Note:
If Kunal is on Checkpoint No. K he can only move to Checkpoint No. K+1.
Constraints:
1 ≤ T ≤ 10
1 ≤ N ≤ 10^5
1 ≤ A[i] ≤ N
Distance covered from 1->2 = 2
Distance covered from 2->3 = 1
Distance covered from 3->4 = 2
Total Distance = 2+1+2 = 5