peterverebics/CodeNet_Python_118 huggingface dataset:
import math
a,b =input().split()
a = int(a)
b = float((int(float(b)*100))/100)
c = math.floor(a*b)
print(c)
import math
li = input().split()
a = int(li[0])
b = float(li[1])
print(math.floor((100 *a * b)/100))
a,b=map(float,input().split())
b=b*100
b=int(b)
a=int(a)
ans=a*b
ans=ans//100
print(ans)
A,B = (float(x) for x in input().split())
b = B * 100
ans = A * b
ans = ans // 100
print(int(ans))
m = input("")
list = m.split(" ")
s1 = list[0].split(".")
s2 = list[1].split(".")
if len(s2) != 1:
    if len(s1) == 1 and len(s2[1]) == 2 and eval(list[0])>=0 and eval(list[0])<=10**15 and eval(list[1])>=0 and eval(list[1])<10:
        num = eval(list[0]) * eval(list[1])
        num = int(num)
        print(int(num))
import math
AB=input().split()
A,B=int(AB[0]),float(AB[1])
print(math.floor(A*B))
A, B = input().split()
A = int(A)
B = float(B)

ans = int(A * B)

print(ans)
a, b = map(float, input().split())
res = (a * b)
print(int(res))
import math
X = input().split()
A = int(X[0])
B = float(X[1])

print(math.floor(A *B))
a, b = map(float,input().split())	
print(int(a * b))
S = input().split()

A = int(S[0])
B = float(S[1])


ans = A*B

print(int(ans))
def main():
    A, B = map(float, input().split())
    print(int(A*B))

if __name__ == '__main__':
    main()
A,B=input().split()
A=int(A)
B=int(100*float(B)+0.5)
print(int(A*B/100))
a,b = input().split()
a = int(a)
b = float(b)
ans = int((a * int(b * 100)) // 100)
print(ans)
def main():
  A, B = input().split()
  A = int(A)
  B = float(B)

  r = str(A * int(100 * B))
  if len(r) <= 2:
    return 0
  return int(r[:-2])

print(main())
A, B = input().split()
A = int(A)
B = int(float(B)*100)
print(int((A*B)//100))
a,b=map(float,input().split())
print((a*b)//100)
# -*- coding: utf-8 -*-
import numpy as np

a, b = map(float, input().split())

print(int(np.floor(a*b)))
import math

A,B = map(float,input().split())
print(math.floor(A*B))
import math
A, B = input().split()
A = int(A)
B = int(100*float(B))


print(int(A*B//100))
import math

A, B = map(float, input().split())

print(math.floor(A * B))
import math

A = list(map(float, input().split()))
print(math.floor(A[0] * A[1]))
a,b=map(float, input().split())
B = b * 1000
ans = a*B / 1000
print(int(ans))
A, B = map(float, input().split())

ans = A * B
print (int(A * B))
a, b = map(float, input().split())
 
b *= 100
 
print(int(a * b / 100))
a,b=input().split()
a=int(a)
b=float(b)*100
print(int(a*b)//100)
n,m = map(str,input().split())
n = int(n)
m = float(m)
print(int(n * m // 1))
import math
a,b = input().split()
b = int(100*float(b))
print(math.floor(int(a)*b//100))
A, B = input().split()
A = int(A)
B = float(B)
res = int(A * B)

print(res)
import math
A, B = map(eval,input().split())
ans = A*B
print(math.trunc(ans))
import math
a, b = map(float,input().split())
ans = int(a * (100*b))
print(int(ans/100))
AB=input().split(" ")
A=int(AB[0])
B=float(AB[1])*100

print(int(A*B/100))
a, b = map(float, input().split())

ans = a * b
print (int(ans))
a,b = map(str,input().split())
a = int(a)
b = int(b.replace( ".",""))
c = float(a*b/100)
print(int(c))
a,b =map(float,input().split())

print(int(a*b))
import math

N = list(map(str, input().split()))
A = int(N[0])
if (N[1].count('.')>0):
  tmp = N[1][0] + N[1][2:]
  B = int(tmp)
else :
  B = int(N[1])
  
print(math.floor(A*B/100))
a,b=input().split()
a=int(a)
b=float(b)
b*=100
c=a*int(b)//100
print(c)
from collections import defaultdict, Counter, namedtuple, deque
import itertools
import functools
import bisect
import heapq
import math
MOD = 10**9+7
# MOD = 998244353

a, b = map(float, input().split())
print(math.floor(a*b))
import math

A,B = open(0).read().split()
A = int(A)
B = int(float(B)*100)
print(math.floor(A*B/100))
A, B = map(float, input().split())
ans = int(A*B//1)
print(ans)
A, B = input().split()

A = int(A) * 100
B = int(B.replace('.', '')) if '.' in B else int(B) * 100

print(str((A * B) / 10000).split('.')[0])
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    A, B = map(float, input().split())

    # A = int(A)
    # res = B - int(B)
    # s = A * int(B)
    # t = A * res
    # print(s+int(t))
    bb = int(B*100)
    ans = A*bb

    print(int(ans/100))

if __name__ == '__main__':
    main()
#from fractions import Fraction
from decimal import Decimal

import math
A,B = input().split()

b = Decimal(float(B))
#b = Fraction(float(B))

tmp = int(A)*b
print(int(math.floor(tmp)))
a,b = input().split()

bx = b.replace(".", "")

ans = 0
ans += int(a) * int(bx[0])
ans += int("0"+a[:-1]) * int(bx[1])
ans += int("00"+a[:-2]) * int(bx[2])


print(ans)
import math
a,b = list(map(float, input().split()))
##print(int(a),b)
print(int(math.floor(a*b)))
from decimal import Decimal
a,b=map(float, input().split())
print(int(Decimal(a)*Decimal(b)))
def main():
  xyz = list(input().split())
  A = int(xyz[0])
  B = int(float(xyz[1]) * 100)
  print((A*B) //100)
main()
a,b = map(float, input().split())

bs = str(b)
bs1, bs2 = map(str, bs.split("."))
digi = len(bs2)

ans = a * (b * 10**digi) // 10**digi
print(int(ans))
from math import *

a,b = map(float,input().split())
print(floor(a*b))
import math

A,B = (map(float, input().strip().split(' ')))
C=A*B
print(math.trunc(C))
import math


def main() -> None:
    a, b = input().split()

    print(math.floor(int(a) * int(float(b)*100) / 100))

    return


if __name__ == '__main__':
    main()
A, B = input().split(' ')
A = int(A)
B_int,B_float = B.split('.')
if B_float=="":
    print(A*B)
    exit()
B_int,B_float = map(int,[B_int,B_float])
if (B_float)<10:
    print(A*(B_int*10+B_float)//10)
else:
    print(A*(B_int*100+B_float)//100)
# = int(input())
A, B = input().split()
# = list(map(int, input().split()))
# = [int(input()) for i in range(N)]
# = [list(map(int, input().split())) for i in range(N)]

B = int(float(B)*100)
A = int(A)

AB = A*B//100

print(AB)
a, b = input().split()
ans = 0
a = int(a)
b = list(b.replace('.', ''))
ans += a * int(b[0])
ans += a * int(b[1]) // 10
ans += a * int(b[2]) // 100
print(ans)
#input info
#N
#A B

from math import floor
a,b = map(float,input().split())
a = int(a)
buff = 1000000
b *= buff
s =floor(a*b/buff)
print(s)
import math
A, B =  map(float, input().split())
print(math.floor(A*B))
a, b = input().split()
a = int(a)
b = float(b)
print(int(a * b))
x = list(input().split())
a = float(x[0])
b = float(x[1])
print(int(a*b))
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()

from collections import defaultdict, deque, Counter
from sys import exit
import heapq
import math
import copy
from bisect import bisect_left, bisect_right

import sys
sys.setrecursionlimit(1000000000)
mod = 10 ** 9 + 7

A, B = input().split()
A = int(A)
B = float(B) * 100
ans = A * B
print(ans // 100)
import numpy as np
S = input().split(" ")

A = int(S[0])
B = int(float(S[1])  * 100)

print((A*B)//100)
import math
A,B=map(float,input().split())
A=int(A)
#A=10**15-1
ans=math.floor(A*B)
print(int(ans))
import math
A,B = map(float, input().split())
print(math.floor(A*B))
from decimal import *
A, B = map(float, input().split())
B = B * 100
A = int(A)
ans = A * B
print(int(ans) // 100)
A,B = map(float,input().split())
B = B*100

ans = A*B
ans /= 100
print(int(ans))
import math
# a = list(map(float, input().split()))
a, b = input().split()
# print(a, b)
ans = (int(a) * (float(b) * 100))
# ans = str(ans)
print(math.floor(ans // 100))
# print(n)
# coding: utf-8
# Your code here!

a,b=input().split()
b=list(b)
b.remove('.')
b=''.join(b)
a=int(a)
b=int(b)
c=str(a*b)
c=list(c)
c.insert(len(c)-2,'.')
c=''.join(c)
c=float(c)
c=c//1
c=int(c)
print(c)
from decimal import Decimal
A,B = map(float,input().split())
A = Decimal(A)
B = Decimal(B)
#print(A*B)
print(int(A*B))
#print(A*B)
#print(int(A*int(B) + A*(B - int(B))))
a,b=input().split()
a=int(a)
b=float(b)
c=int(a*b)
print(c)
a, b = map(float, input().split())

print(int((a*(b*100))/100))
import sys
A, B = input().split()
A = int(A)
B = float(B)
BI = int(B*100)
print(int(A*BI//100))
import math
def c169(a, b):

    return math.floor(a*(b*100)/100)

def main():
    a, b = map(float, input().split())
    print(c169(a, b))

if __name__ == '__main__':
    main()
a,b=input().split()
a=int(a)
c=""
for i in range(len(b)):
    if not b[i]==".":
        c+=b[i]
b=int(c)
ans=float(a*b)
ans=int(ans/100+0.001)
print(ans)
a, b = list(input().split())

a = float(a)
b = float(b)

print(int(a*b))
a, b = input().split()
 
a = int(a)
print(int(a * (float(b)*100) // 100))
import sys

(a, b) = map(float, sys.stdin.readline().strip().split())

ans = int(a * b)

print(ans)
A, B = map(float, input().split())
epsilon = 0.000001
A = int(A+epsilon)
B = int((100*B+epsilon))
print(int(A*B+epsilon)//100)
import math
a = list(map(float, input().split()))
ans = math.floor(a[0]*a[1])
print(ans)
import math
A, B = input().split()
A = int(A)
Bi, Bf = map(int, B.split('.'))
ansi = A*Bi
ansf = A*Bf
print(math.floor(ansi + ansf/100))
a,b = map(float,input().split())
# b = 
print(int(a*b))
A, B = input().split()
A = int(A)
B = int(100*float(B))
print((A*B)//1)
import math

A , B =list(map(float,input().split()))
c = math.floor(A * B)

print(int(c))
A,B = map(eval,input().split())
print(int(A*B))
a,b = map(float,input().split())
r = int(a*b)
print("{0:.0f}".format(r))
a, b = map(float, input().split())
c = a * b 
d = c // 1
e = int(d)
print(e)
def main():
    import sys
    import math
    def input():
        return sys.stdin.readline()[:-1]

    A,B=map(float,input().split())
    c=int(A*B)
    print(c)
if __name__ == '__main__':
    main()
import math
a,b = input().split()
b = int(float(b) *100)
a = int(a)
print(int(a*b//100))
#!/usr/bin/env python3
import sys


def solve(A: int, B: float):
    print(int(A*B))
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = float(next(tokens))  # type: float
    solve(A, B)

if __name__ == '__main__':
    main()
A,B = map(float,input().split())

print(int(A*B//1))
from math import*
a,b=map(str,input().split())
print(int(float(a)*float(b)))
nums = [x for x in input().split()]
a,b = int(nums[0]), float(nums[1])

print(int(a*b))
A, B = input().split()
A = int(A)
B = int(float(B)*100)
print((A*B)//100)
import sys
from collections import Counter
from collections import deque
import heapq
import math
import fractions
import bisect
import itertools
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

a,b=map(float,input().split())
print(int(a*b))
n=int(input())
ab=[list(map(int,input().split())) for _ in range(n)]
ab.sort(key=lambda x:x[0])
a=[a for a,b in ab]
b=[b for a,b in ab]
a.sort()
b.sort()
l=0
if n%2==1:
  print(b[n//2]-a[n//2]+1)
  #print(b[n//2],a[n//2])
else:
  am=(a[n//2]+a[n//2-1])
  bm=(b[n//2]+b[n//2-1])
  print(bm-am+1)
N = int(input())
A = [0]*N
B = [0]*N
for i in range(N):
    A[i],B[i] = map(int,input().split())
A.sort()
B.sort()

if N % 2 == 1:
    mid_ind = N//2
    lower = A[mid_ind]
    upper = B[mid_ind]
    print(upper-lower+1)

else:
    mid_a = N//2
    mid_b = mid_a-1
    lower = (A[mid_a]+A[mid_b])/2
    upper = (B[mid_a]+B[mid_b])/2
    print(int((upper-lower)*2+1))
N = int(input())
A = [list(map(int, input().split())) for _ in range(N)]
AX = [A[i][0] for i in range(N)]
BX = [A[i][1] for i in range(N)]
AX.sort()
BX.sort()
if N % 2 == 1:
  L = AX[(N-1)//2]
  R = BX[(N-1)//2]
  print(R-L+1)
else:
  L = AX[N//2-1] + AX[N//2]
  R = BX[N//2-1] + BX[N//2]
  print(R-L+1)
from statistics import median

n = int(input())
x_min = []
x_max = []
for _ in range(n):
    a, b = map(int, input().split())
    x_min.append(min(a, b))
    x_max.append(max(a, b))

print(int((median(x_max)-median(x_min))*2)+1 if n % 2 == 0 else median(x_max)-median(x_min)+1)
def median(array):
    tmp = sorted(array)
    if len(array) % 2:
        return tmp[len(array)//2]
    else:
        return (tmp[len(array)//2] + tmp[len(array)//2 - 1]) / 2


[n], *x = [[*map(int, t.split())] for t in open(0)]
a, b = zip(*x)
if n % 2 == 0:
    print(int(2*(median(b) - median(a)) + 1))
else:
    print(median(b) - median(a) + 1)
N=int(input())
A=[0]*N
B=[0]*N
for i in range(N):
    A[i],B[i]=map(int,input().split())

A.sort()
B.sort()

if N%2==1:
    print(abs(A[N//2]-B[N//2])+1)
else:
    print(abs(A[N//2]+A[N//2-1]-B[N//2]-B[N//2-1])+1)
n,*l=map(int,open(0).read().split())
m,M=sorted(l[::2]),sorted(l[1::2])
d=n//2
print(M[d]-m[d]+1+(M[d-1]+-m[d-1])*(n%2^1))
n=int(input())
m=[];M=[]
for i in range(n):
    a,s=map(int,input().split())
    m.append(a);M.append(s)
m.sort();M.sort()
if n%2:
    print(M[n//2]-m[n//2]+1)
else:
    print(M[n//2]+M[n//2-1]-m[n//2]-m[n//2-1]+1)
n=int(input())

A=[]
B=[]

for i in range(n):
    ai,bi=map(int,input().split())
    A.append(ai)
    B.append(bi)

A.sort()
B.sort()

amid=0
bmid=0
if n%2==0:
    amid=(A[round(n/2-1)]+A[round(n/2)])/2
    bmid=(B[round(n/2-1)]+B[round(n/2)])/2
else:
    amid=A[round((n-1)/2)]
    bmid=B[round((n-1)/2)]

d=bmid-amid

if n%2==0:
    print(round(2*d)+1)
else:
    print(d+1)
n = int(input())
ab = [list(map(int, input().split())) for _ in range(n)]

a = [x[0] for x in ab]
a.sort()
b = [y[1] for y in ab]
b.sort()

if n % 2 == 0:
    print((b[n // 2 - 1] + b[n // 2]) - (a[n // 2 - 1] + a[n // 2]) + 1)
else:
    print(b[(n - 1) // 2] - a[(n - 1) // 2] + 1)
n = int(input())

a = []
b = []

for i in range(n):
    x = list(map(int, input().split()))
    a.append(x[0])
    b.append(x[1])

a_sort = sorted(a)
b_sort = sorted(b)

flags = [False] * n

s = 0

if n % 2 == 1:
    s = b_sort[n//2] - a_sort[n//2] + 1

else:
    p_min = a_sort[(n//2)-1]
    p_max = b_sort[(n//2)-1]
    q_min = a_sort[(n//2)]
    q_max = b_sort[(n//2)]

    s = ((p_max+q_max) - (p_min+q_min) ) + 1
print(s)
from statistics import median

n = int(input())
a = [None] * n
b = [None] * n
for i in range(n):
    a[i], b[i] = map(int, input().split())

if n % 2 == 1:
    print(abs(median(b) - median(a)) + 1)
else:
    print(int(abs(median(b) - median(a)) * 2) + 1)
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline

n = int(input())

ls = []; rs = []
for _ in range(n):
    a,b = [int(i) for i in readline().split()]
    ls.append(a)
    rs.append(b)

ls.sort()
rs.sort()

ans = 0

if n%2 == 1:
    l = ls[n//2]
    r = rs[n//2]
    ans = r-l+1
else:
    l2 = ls[n//2-1]+ls[n//2]
    r2 = rs[n//2-1]+rs[n//2]
    ans = r2-l2+1

print(ans)
def main():
    n = int(input())
    A, B = [None]*n, [None]*n
    for i in range(n):
        A[i], B[i] = map(int, input().split())
    A.sort()
    B.sort()
    if n%2 == 0:
        p = (A[n//2-1] + A[n//2])/2
        q = (B[n//2-1] + B[n//2])/2
        print(int((q-p+0.5)*2))
    else:
        print(B[n//2] - A[n//2] + 1)

if __name__ == "__main__":
    main()
def N(): return int(input())
def NM():return map(int,input().split())
def L():return list(NM())
def LN(n):return [N() for i in range(n)]
def LL(n):return [L() for i in range(n)]
n=N()
l=LL(n)
l.sort()
if n%2==1:
    a,b=l[n//2]
    l.sort(key=lambda x:x[1])
    c,d=l[n//2]
    print(d-a+1)
else:
    l.sort()
    a,_=l[n//2-1]
    b,_=l[n//2]
    l.sort(key=lambda x:x[1])
    _,c=l[n//2-1]
    _,d=l[n//2]
    print(c+d-a-b+1)
n=int(input())
low=[]
high=[]
for i in range(n):
    a,b=map(float,input().split())
    low.append(a)
    high.append(b)
low.sort()
high.sort()
if n%2==0:
    low_avg=(low[n//2-1]+low[n//2])/2
    high_avg=(high[n//2-1]+high[n//2])/2
    ans=(high_avg-low_avg)*2+1
else:
    ans=high[(n-1)//2]-low[(n-1)//2]+1
print(int(ans))
N = int(input())
AB = []
low = []
up = []
for i in range(N):
    A, B = map(int, input().split())
    AB.append([A, B])
    low.append(A)
    up.append(B)
    
low = sorted(low)
up = sorted(up)
    
if N%2 == 1:
    m_up = up[N//2]
    m_low = low[N//2]
    ans = m_up-m_low+1
    print(ans)
else:
    m_up = up[N//2] + up[N//2-1]
    m_low = low[N//2-1] + low[N//2]
    ans = m_up-m_low+1
    print(ans)
n = int(input())
A = []
B = []
for i in range(n):
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)

A.sort()
B.sort()
if n%2 == 1:
    ans = B[n//2]-A[n//2]+1
else:
    x = A[n//2-1]+A[n//2]
    y = B[n//2-1]+B[n//2]
    ans = y-x+1
print(ans)
from operator import itemgetter
N = int(input())
A = []
B = []
for i in range(N):
  a,b = list(map(int, input().split()))
  A.append(a)
  B.append(b)

A.sort()
B.sort()

if N % 2 > 0:
  print(abs(B[(N-1) // 2] - A[(N-1) // 2]) + 1)
else:
  B1,B2 = B[N//2-1], B[N//2]
  A1,A2 = A[N//2-1], A[N//2]
  xb, xa = (B1+B2)/2, (A1+A2)/2
  print(int((xb-xa) * 2) + 1)
from numpy import*
a,b=median(t:=loadtxt(open(0),skiprows=1),0)
print(int((a-b)*~(~len(t)%2))+1)
N = int(input())
A,B = [0]*N,[0]*N
for i in range(N):
    A[i],B[i] = map(int,input().split())
A = sorted(A)
B = sorted(B)
if N%2 == 1:
    ans = B[int((N-1)/2)] - A[int((N-1)/2)] + 1
elif N%2 == 0:
    ans = B[int(N/2)] + B[int(N/2-1)] - A[int(N/2)] - A[int(N/2-1)] + 1
print(ans)
n = int(input())
l = [list(map(int,input().split())) for _ in range(n)]
l1 = sorted([i for i,k in l])
l2 = sorted([k for i,k in l])[::-1]

if n%2!=0:
  a = l1[int(n//2)]
  b = l2[int(n//2)]
  print(b-a+1)
  
else:
  a1 = l1[int(n//2)-1]
  a2 = l1[int(n//2)]
  b1 = l2[int(n//2)-1]
  b2 = l2[int(n//2)]
  print((b1-a1+1)+(b2-a2+1)-1)
n = int(input())
a=[]
b=[]
for i in range(n):
    h,m=list(map(int,input().split()))
    a.append(h)
    b.append(m)
a.sort()
b.sort()

if n%2:
    k=(n-1)//2
    
        
    print(b[k]-a[k]+1)
else:
    k=n//2
    

    
    print(b[k]+b[k-1]-(a[k]+a[k-1])+1)
import statistics

N = int(input())
A = []
B = []
for i in range(N):
    a,b = map(int, input().split())
    A.append(a)
    B.append(b)

medA = statistics.median(A)
medB = statistics.median(B)

if N % 2 == 1:
    print(medB - medA+1)
else:
    print(int((medB - medA)*2) + 1)
N=int(input())
A,B=[],[]
for i in range(N):
  a,b=map(int,input().split())
  A.append(a)
  B.append(b)
  
A,B=map(sorted,(A,B))

if N % 2 == 1:
  mA, mB = A[N//2],B[N//2]
  print(mB-mA+1)
else:
  mA, mB = (A[N//2-1]+A[N//2])/2,(B[N//2-1]+B[N//2])/2
  print(int((mB-mA)/0.5+0.5)+1)
import sys
input = sys.stdin.readline
def main():
    n = int(input())
    a = []
    b = []
    for _ in range(n):
        A,B = map(int,input().split())
        a.append(A)
        b.append(B)
    a.sort()
    b.sort()
    if n%2:
        print(b[n//2]-a[n//2]+1)
    else:
        print((b[n//2]+b[n//2-1]) - (a[n//2]+a[n//2-1])+1)
    
if __name__ == "__main__":
    main()
n = int(input())
a = []
b = []
for _ in range(n):
    atmp, btmp = map(int, input().split())
    a.append(atmp)
    b.append(btmp)
a.sort()
b.sort()
if n % 2 == 1:
    pos = n // 2
    print(b[pos] - a[pos] + 1)
else:
    pos = n // 2 - 1
    a1 = a[pos]
    a2 = a[pos + 1]
    b1 = b[pos]
    b2 = b[pos + 1]
    medmin = a1 + a2
    medmax = b1 + b2
    print(medmax - medmin + 1)
N = int(input())
A = []
B = []
for i in range(N):
    AB = list(map(int, input().split()))
    A.append(AB[0])
    B.append(AB[1])
A = sorted(A)
B = sorted(B)

if N % 2 == 0:
    min1 = A[N//2-1]
    min2 = A[N//2]
    max2 = B[-N//2]
    max1 = B[-N//2-1]
    # print(min1, min2, max1, max2)
    ans = ((max2 + max1) / 2 - (min2 + min1) / 2) * 2 + 1
else:
    mini = A[N//2]
    maxi = B[-N//2]
    # print(mini, maxi)
    ans = maxi - mini + 1
print(int(ans))
n,*ab = map(int,open(0).read().split())
a = sorted(ab[::2])
b = sorted(ab[1::2])
m = (n-1)//2
if n % 2 == 0:
  print(b[m]-a[m]+b[m+1]-a[m+1]+1)
else:
  print(b[m]-a[m]+1)
N = int(input())
X = [list(map(int,input().split())) for _ in range(N)]
A = sorted([X[i][0] for i in range(N)])
B = sorted([X[i][1] for i in range(N)])
if N%2==1:
    a = A[N//2]
    b = B[N//2]
    print(b-a+1)
else:
    a = (A[(N-1)//2]+A[N//2])/2
    b = (B[(N-1)//2]+B[N//2])/2
    print(int((b-a)/0.5)+1)
n = int(input())

a, b = [*map(list, zip(*[[*map(int, input().split())] for _ in range(n)]))]
a.sort()
b.sort()

l0, r0 = a[(n-1)//2], b[(n-1)//2]
if n % 2 == 1:
    print(r0-l0+1)
else:
    l1, r1 = a[n//2], b[n//2]
    print((r1+r0)-(l1+l0)+1)
def main():
    n = int(input())
    a = [None]*n
    b = [None]*n
    for i in range(n):
        a[i],b[i] = map(int, input().split())
    a.sort()
    b.sort()    
    if n&1:
        print(b[n//2]-a[n//2]+1)
    else:
        print(b[n//2-1]+b[n//2]-a[n//2]+1-a[n//2-1])
            
if __name__ == "__main__":
    main()
from collections import deque
import sys
input = sys.stdin.readline

n = int(input())
a = [0]*n
b = [0]*n

for i in range(n):
    a[i], b[i] = map(int, input().split())

a.sort()
b.sort()

if n%2!=0 :
    l = a[int(n/2)]
    u = b[int(n/2)]
    ans = u - l + 1
else:
    l = a[int(n/2-1)] + a[int(n/2)]
    u = b[int(n/2-1)] + b[int(n/2)]
    ans = u - l +1

print(ans)
import statistics

N = int(input())
a = []
b = []
for i in range(N):
    A,B = map(int, input().split())
    a.append(A)
    b.append(B)

a2 = statistics.median(a)
b2 = statistics.median(b)

if N % 2 == 0:
    c = (b2-a2)/0.5 + 1
    print(int(c))
else:
    print(b2-a2+1)
n = int(input())
a = []
b = []
for i in range(n):
  x,y = map(int,input().split())
  a.append(x)
  b.append(y)
a.sort()
b.sort()
if n % 2 == 1:
  print(b[n//2] - a[n//2] + 1)
else:
  print(b[n//2]+b[n//2-1]-a[n//2]-a[n//2-1]+1)
N = int(input())
l, r = [0 for _ in range(N)], [0 for _ in range(N)]
for i in range(N):
    l[i], r[i] = map(int, input().split())


if N%2 == 1:
    lm = sorted(l)[(N+1)//2-1]
    rm = sorted(r)[(N+1)//2-1]
    print(rm - lm + 1)
else:
    lm = sum(sorted(l)[N//2-1:N//2+1])/2
    rm = sum(sorted(r)[N//2-1:N//2+1])/2
    # 0.5 刻みで増えることに注意
    print(int((rm-lm+0.5)*2))
from statistics import median

n = int(input())
abl = [list(map(int,input().split())) for nesya in range(n)]
al = []
bl = []
for ab in abl:
  al.append(ab[0])
  bl.append(ab[1])
if n%2 == 1:
  print(median(bl)-median(al)+1)
else:
  print(int(median(bl)*2-median(al)*2+1))
import sys
input = sys.stdin.buffer.readline


n = int(input())

tank = []
dg = 10**10
mi = []
ma = []

for _ in range(n):
    a,b = map(int,input().split())
    tank.append(a*dg + b)
    mi.append(a)
    ma.append(b)

mi.sort()
ma.sort(reverse = True)

if n % 2 == 1:
    c = mi[n//2]
    d = ma[n//2]
    print(d-c+1)
else:

    c = (mi[(n//2) - 1] + mi[n//2])
    d = (ma[(n//2) - 1] + ma[n//2])

    print(d-c+1)
import numpy as np

N = int(input())
A, B = [], []
for i in range(N):
    a, b = map(int, input().split())
    A.append(a if N & 1 else 2 * a)
    B.append(b if N & 1 else 2 * b)

a, b = int(np.median(A)), int(np.median(B))
if a > b:
    a, b = b, a
print(b - a + 1)
import sys
input = sys.stdin.readline
import numpy as np
from decimal import *

n = int(input())

Li = [[int(e) for e in input().split()] for _ in range(n)]

Li = np.array(Li)
LA = Li[:,0]
LB = Li[:,1]

LA.sort()
LB.sort()


if n %2 == 0: # n = 2m
    idx =n //2 -1
    min = (LA[idx] + LA[idx+1])
    max = (LB[idx] + LB[idx+1])

else: # n = 2m - 1
    idx =(n+1) //2 -1
    min = LA[idx]
    max = LB[idx]

print(max - min +1 )
import statistics
n = int( input() )
a = []
b = []
for _ in range( n ):
    a_i, b_i = map( int, input().split() )
    a.append( a_i )
    b.append( b_i )

m_a = statistics.median( a )
m_b = statistics.median( b )

if n % 2 == 1:
    print( int( m_b - m_a + 1 ) )
else:
    print( int( ( m_b - m_a ) * 2 + 1 ) )
n = int(input())
a = [0] * n
b = [0] * n
for i in range(n):
    a[i], b[i] = map(int, input().split())
def md(x):
    u = sorted(x)
    if len(u) % 2 == 0:
        return u[len(u) // 2] + u[len(u) // 2 - 1]
    else:
        return u[len(u) // 2]
u, v = md(a), md(b)
print(v - u + 1)
n=int(input())
a,b=[],[]
for _ in range(n):
    a_,b_=map(int,input().split())
    a.append(a_)
    b.append(b_)
a.sort()
b.sort()
if n%2:
    print(b[n//2]-a[n//2]+1)
else:
    lower=(a[n//2]+a[n//2-1])/2
    upper=(b[n//2]+b[n//2-1])/2
    print(int(upper*2-(lower*2-1)))