P10652 [HackerEarth] 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

输入格式

见题面

输出格式

见题面

样例输入
4 0 0 0 2 2 2 2 0 SAMPLE
样例输出
1