#include using namespace std; #define all(x) begin(x), end(x) #define sz(x) (ll)(x).size() using ll = long long; using ld = long double; using pt = complex; constexpr ll inf = 0x3FFFFFFFFFFF; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); ll n; cin >> n; ll l = inf; ll r = -inf; ll u = -inf; ll d = inf; for (ll i = 0; i < n; i++) { ll x, y; cin >> x >> y; pt tmp = pt(x,y)*pt(1,1); l = min(l, real(tmp)); r = max(r, real(tmp)); u = max(u, imag(tmp)); d = min(d, imag(tmp)); } ll w = r-l+1; ll h = u-d+1; ll res = (w+2)*(h+2)-h*w; res /= 2; if ((h == 1) != (w == 1)) res++; cout << res << endl; }