from statistics import median



n = int(eval(input()))

ab = [list(map(int, input().split())) for _ in range(n)]

a = [i for i, j in ab]

b = [j for i, j in ab]



if n % 2 == 1:

    print((abs(median(b) - median(a)) + 1))

else:

    print((int(abs(median(b) - median(a)) * 2) + 1))
from statistics import median



n = int(eval(input()))

a = []

b = []

for i in range(n):

    A, B = list(map(int, input().split()))

    a.append(A)

    b.append(B)



if n % 2 == 1:

    print((abs(median(b) - median(a)) + 1))

else:

    print((int(abs(median(b) - median(a)) * 2) + 1))
from statistics import median

n = int(eval(input()))
ab = [list(map(int, input().split())) for _ in range(n)]
a = [i for i, j in ab]
b = [j for i, j in ab]
if n % 2 == 1:
    print((abs(median(b) - median(a)) + 1))
else:
    print((int(abs(median(b) - median(a)) * 2) + 1))

from statistics import median

n = int(eval(input()))
a = []
b = []
for i in range(n):
    A, B = list(map(int, input().split()))
    a.append(A)
    b.append(B)
if n % 2 == 1:
    print((abs(median(b) - median(a)) + 1))
else:
    print((int(abs(median(b) - median(a)) * 2) + 1))

-ab = [list(map(int, input().split())) for _ in range(n)] -a = [i for i, j in ab] -b = [j for i, j in ab] +a = [] +b = [] +for i in range(n): +    A, B = list(map(int, input().split())) +    a.append(A) +    b.append(B)