You are an IT system administrator in the Ministry of Defense of Polygon Country.
The border of Polygon Country is a polygon with N vertices. Drawn on the plane, every vertex sits on a lattice point and every edge is parallel to the x axis or the y axis.
To keep enemies out, a very strong defense wall runs along the whole border. A vertex is where two walls meet, so it has a structural weakness that cannot be removed. Enemies therefore attack and invade at the vertices.
To watch the vertices and notice an invasion as early as possible, the ministry decided to hire guards. Guards stand on vertices only, and they are placed so that every vertex is watched by at least one of them. A guard at vertex A can watch vertex B if the whole segment joining A and B lies inside the polygon or on its edges. A guard also watches the vertex he or she stands on. One guard watches every vertex he or she can watch at the same time.
The ministry wants to cut the defense cost, so it wants the number of guards to be as small as possible. Compute the minimum number of guards needed to watch all vertices of Polygon Country.
The input is formatted as follows.
N
X1 Y1
:
:
XN YN
The first line contains an even integer N (4≤N<40).
Each of the next N lines describes one vertex of the polygon with two integers Xi and Yi separated by one space (1≤i≤N, ∣Xi∣≤1000, ∣Yi∣≤1000). The i-th vertex is at (Xi,Yi).
If i is odd, then Xi=Xi+1 and Yi=Yi+1. If i is even, then Xi=Xi+1 and Yi=Yi+1. Here XN+1=X1 and YN+1=Y1.
The vertices are given in counterclockwise order in the coordinate system where the x axis points right and the y axis points up. The polygon is simple, so an edge shares no point with any other edge except the endpoints it shares with its two neighbors.
Print the minimum number of guards on one line.