Elephants#5246

Elephants

2 seconds
64 megabytes
Medium

In the Mendeleev Zoo, there are elephants, each residing in its own cage. For the purposes of this problem, each cage can be considered as a point on the plane. Each elephant has a field of view of 180^\circ, meaning it can see all objects that are located within and on the boundary of a certain angle at any given moment.

When arranging the cages, the Mendeleev zoologists made sure that each elephant could orient itself in such a way that no other elephants were within its field of view. Before the arrival of schoolchildren from various countries, the zoo management decided to paint two cages green. The elephants in these two cages must be able to orient themselves so that they can see only each other and no other elephants.

Determine the number of ways to select such a pair of cages.

Input

The first line contains the natural number (1 \leq n \leq 1000), the number of cages in the zoo. Each of the next lines contains two integers x_i and y_i — the coordinates of the th cage. All coordinates are integers and do not exceed 10^6 in absolute value. No two cages are located at the same point.

Output

Print the number of ways to choose a pair of cages that satisfy the described conditions.

Examples

Example 1

Loading
Loading