#include <iostream>
#include <algorithm>
const int N = 8;
const int INF = 0x3f3f3f3f;
int read() {int x; return scanf("%d", &x), x;}
int n, m;
int _x[N + 5], _y[N + 5];
struct function
{
int a, b, c; // ax + by + c >= 0
} t[N + 5], p[N + 5];
int get(int x)
{
// printf("******%d******\n", x);
int l = -INF, r = INF;
for (int i = 1; i <= n; i ++ )
{
int a = p[i].a, b = p[i].b, c = p[i].c;
// printf("%d %d %d\n", a, b, c);
if (b == 0) if (a * x + c < 0) return 0;
if (b > 0) l = std :: max(l, (int)std :: ceil(1.0 * ( - a * x - c) / b));
if (b < 0) r = std :: min(r, (int)std :: floor(1.0 * (a * x + c) / (-b)));
if (l > r) return 0;
}
// printf("%d %d\n", l, r);
return r - l + 1;
}
int main()
{
n = read();
for (int i = 1; i <= n; i ++ ) _x[i] = read(), _y[i] = read(), m = std :: max(m, std :: max(_x[i], _y[i]));
for (int i = 1; i <= n; i ++ )
{
int x1 = _x[i], y1 = _y[i], x2 = _x[i % n + 1], y2 = _y[i % n + 1];
if (x1 == x2)
{
if (y1 < y2) t[i] = /* */ {1, 0, -x1};
else t[i] = /* */ {-1, 0, x1};
}
else t[i] = /* */ {y2 - y1, x1 - x2, x2 * y1 - x1 * y2};
}
for (int i = 1; i <= n; i ++ ) p[i] = t[i];
int res = 0;
for (int a = 1; a <= m; a ++ )
{
for (int b = 0; b <= m; b ++ )
{
// int a = 1, b = 1;
for (int i = 1; i <= n; i ++ ) p[i].c = t[i].c - std :: max({t[i].a * (0) + t[i].b * (0), t[i].a * ( - a) + t[i].b * ( - b), t[i].a * (b - a) + t[i].b * ( - a - b), t[i].a * (b) + t[i].b * ( - a)});
for (int i = 0; i <= m; i ++ ) res += get(i);
}
}
printf("%d", res);
return 0;
}
/*
4
0 2
2 2
2 0
0 0
6
*/