Colored cells#7231

Colored cells

1 second
64 megabytes
Hard

On a sheet of graph paper, an -sided polygon is drawn with its vertices positioned at the intersections of the grid lines. All fully enclosed cells within the polygon, which do not extend beyond its boundaries, are colored. Your task is to determine the number of these colored cells, given the sequential coordinates of the polygon's vertices in a rectangular coordinate system. The axes align with two perpendicular grid lines, and the unit segment corresponds to the side of a cell.

Input

The first line contains a natural number , representing the number of vertices of the polygon. The following lines each contain two integers, which are the consecutive coordinates of the polygon's vertices. All numerical values are within the range of to , inclusive.

Output

Provide the number of colored cells.

Examples

Example 1

Loading
Loading