Aishwarya has an iron rod of some positive integer length N. She wants to get four parts of the rod by performing exactly three cuts to it. The sum of these lengths will obviously be N and each part must have some positive integer length.
But there is one problem that Aishwarya loves rectangles and hates squares, so she wonders, how many ways are there to split an iron rod into four parts so that it's possible to form a rectangle using these parts, but is impossible to form a square.
Aishwarya needs your help to count the number of such ways. Two ways to cut the iron rod are considered distinct if there exists some integer a, such that the number of parts of length a in the first way differ from the number of parts of length a in the second way.
Input:
The first line of input contains an integer T denoting the number of test cases and the description of T test cases are as follows:-
The first line of the input contains a positive integer N — the length of Aishwarya's iron rod.
Output:
The output should contain a single integer — the number of ways to split Aishwarya's iron rod into four parts of positive integer length so that it's possible to make a rectangle by connecting the ends of these parts, but is impossible to form a square.
Constraints:
1 ≤ T ≤ 105
1 ≤ N ≤ 2*109
Probelm setter: Mahima Singh
In the first sample, there is only one way to divide the stick: {1, 1, 2, 2}.
In the second sample, there are four ways to divide the stick {1, 1, 9, 9}, {2, 2, 8, 8}, {3, 3, 7, 7} and {4, 4, 6, 6}.
Note that {5, 5, 5, 5} doesn't work.