Problem: 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

Solution (in PYTHON):

Solution:
from fractions import gcd
n = input()
vertices = []
for i in range(n):
    vertices.append(map(int, raw_input().split()))
vertices.append(vertices[0])
b = 0
for i in range(n):
    dx = abs(vertices[i + 1][0] - vertices[i][0])
    dy = abs(vertices[i + 1][1] - vertices[i][1])
    b += gcd(dx, dy)

b = max(0, b)
area = 0
for i in range(n):
    area += (vertices[i][0] + vertices[i + 1][0]) * \
        (vertices[i][1] - vertices[i + 1][1])
area /= 2.0
ans = area + 1 - b / 2.0
print int(ans)