A particular month has
days, numbered from to .
Day is a Monday, and the usual -day week is followed (so day is Tuesday, day is Wednesday, and so on).
Every Saturday and Sunday is a holiday. There are festival days, which are also holidays. Note that it is possible for a festival day to occur on a Saturday or Sunday.
You are given the dates of the festivals. Determine the total number of holidays in this month.
Input Format
- The first line of input contains a single integer , denoting the number of test cases. The description of test cases follows.
- The first line of each test case contains an integer denoting the number of festival days.
- The second line of each test case contains distinct space-separated integers , denoting the festival days. Note that the are not necessarily given in sorted order.
Output Format
For each test case, output a new line containing the total number of holidays.
Constraints
- All the are distinct
Sample Input 1
3
2
5 7
3
23 1 6
1
13
Sample Output 1
9
10
8
Explanation
Test Case : Days and are Saturdays, and days are Sundays. The festivals fall on day and day , but day is already a Sunday. This gives us holidays in total — days .
Test Case : Days and are Saturdays, and days are Sundays. The festivals fall on day , day , and day . This gives us holidays in total — days .
Test Case : Days and are Saturdays, and days are Sundays. The only festival is on day , which is already a holiday. This gives us holidays in total — days .
ConversionConversion EmoticonEmoticon