Saskatchewan

Time limit1sMemory limit128 MB

Problem

A province's land is surveyed in sections. One section is a square mile of land. Grid roads mark off the sections: there is exactly one north-south road and one east-west road every mile. (The curvature of the earth would complicate things, but you may ignore it and treat the whole province as a plane.)

The provincial border is a polygon whose vertices lie at intersections of the grid roads, that is, at integer coordinates. The edges of the border, however, do not necessarily follow the grid roads, so some sections are cut by the border.

Determine how many sections lie completely inside the province.

Input

The input is a series of at most 100 coordinate pairs, one pair per line. These coordinates are the vertices of the border polygon given in order; connecting them in order (and the last vertex back to the first) forms the border. All coordinates are integers in the first quadrant, with $0 \le x, y \le 100000$.

Output

Output a single integer: the number of sections (unit squares whose four corners are at integer coordinates) that are entirely contained within the province.