N = int(eval(input()))

A, B = [], []

for _ in range(N):

    a, b = list(map(int, input().split()))

    A.append(a)

    B.append(b)

A, B = sorted(A), sorted(B)

m1 = A[N//2] + A[(N-1)//2]

m2 = B[N//2] + B[(N-1)//2]

print(((m2 - m1) // (N % 2 + 1) + 1))
import sys

input = lambda: sys.stdin.readline().rstrip()

N = int(eval(input()))

A, B = [], []

for _ in range(N):

    a, b = list(map(int, input().split()))

    A.append(a)

    B.append(b)

A, B = sorted(A), sorted(B)

m1 = A[N//2] + A[(N-1)//2]

m2 = B[N//2] + B[(N-1)//2]

print(((m2 - m1) // (N % 2 + 1) + 1))
N = int(eval(input()))
A, B = [], []
for _ in range(N):
    a, b = list(map(int, input().split()))
    A.append(a)
    B.append(b)
A, B = sorted(A), sorted(B)
m1 = A[N // 2] + A[(N - 1) // 2]
m2 = B[N // 2] + B[(N - 1) // 2]
print(((m2 - m1) // (N % 2 + 1) + 1))

import sys

input = lambda: sys.stdin.readline().rstrip()
N = int(eval(input()))
A, B = [], []
for _ in range(N):
    a, b = list(map(int, input().split()))
    A.append(a)
    B.append(b)
A, B = sorted(A), sorted(B)
m1 = A[N // 2] + A[(N - 1) // 2]
m2 = B[N // 2] + B[(N - 1) // 2]
print(((m2 - m1) // (N % 2 + 1) + 1))

+import sys + +input = lambda: sys.stdin.readline().rstrip()