integers-only-allowed

You have a polygon described by coordinates of its vertices. Can you find how many points with integer coordinates lay strictly inside it?

Input
The first line contains an integer N - number of vertices.
Next N lines contain 2 space-separated integers each and describe polygon vertices in clockwise order. Note that polygon can be convex and non-convex as well.

Output
Output one integer - answer for the problem

Constraints
3 ≤ N ≤ 1000 
|xi|, |yi| ≤ 10^6

SAMPLE INPUT
4
0 0
0 2
2 2
2 0

SAMPLE OUTPUT
1

Source: hackerearth | Difficulty: EASY
Tags: Geometry


Solutions: