#00032B

O-Area

The prime minister of Vojvodina has recently bought a piece of valuable agricultural land, which is situated in a valley forming a regular grid of unit square fields. Since Vojvodina is flat, no need to make life difficult to people who work on land registration. So when they verify the transaction, especially whether the price corresponds to the market value of the land, which is always determined as the number of unit square fields fully contained in it, this is much easier then in ACM land. Your task is to write a program that computes the market value. The piece of land forms a closed polygon, whose vertices lie in the corners of unit fields. For example, the polygon in the picture (it corresponds to the first example in Sample Input) contains three square fields.



Image: area


InputFirst line of input containing one integer number N (3 ≤ N ≤ 100), the number of polygon vertices. Each of the following N lines contains a pair of integers Xi and Yi, giving the coordinates of one vertex. The vertices are listed in the order they appear along the boundary of the polygon. You may assume that no coordinate will be less than -500 or more than 500 and that the polygon will be convex.


OutputOutput one line with an integer number -- the number of unit squares that are completely inside the polygon


Input:
4
1 1
5 3
5 4
3 5
Output:
3

Input:
5
3 3
2 5
3 4
5 2
4 2

Output:
0

Input:
5
0 0
0 -50
-50 -51
-51 -50
-50 0

Output:
2500

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.