As the total holidays are fix in a month so we will just compare our festival dates with the fix days if the festival day doesn’t falls into the fix days so the total hoildays will increase by 1 and so on.
for _ in range(int(input())):
n = int(input())
l = list(map(int,input().split()))
r = [6,7,13,14,20,21,27,28]
c = len(r)
for x in l:
if x not in r:
c+=1
print(c)