Mr. Chou is a diamond dealer in a two-dimensional world. To be a successful businessman, he must know the exact value of the (two-dimensional) diamonds he trades. Mr. Chou is tired of computing these values by hand, so you must write a program that does it for him.

The value of a diamond is determined by the smoothness of its surface. Smoothness depends on the number of faces on the surface: the more faces, the smoother the surface. If the surface has dents (shown in red in the figure), the value of the diamond decreases.
A diamond is given as a simple polygon defined by its vertices. Each concave vertex of the polygon (a vertex whose interior angle is greater than 180 degrees) is a dent, and each edge of the polygon is a face. A face is considered to be in a dent if at least one of its two endpoints is a concave vertex.
Let $a$ be the number of dents and let $b$ be the number of faces that are not in any dent. The value $v$ of the diamond is
$$v = -a \cdot p + b \cdot q,$$
where $p$ is the penalty for a dent and $q$ is the value of a face. If $v$ is negative, the diamond is worthless and its value is $0$.
The first line contains the number of test cases $T$.
Each test case consists of:
No three vertices of a single diamond are collinear.
For each test case, print a single line containing one integer: the value of the diamond.