import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import Data.List

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
    n <- getInt
    [as,bs] <- transpose <$> replicateM n getIntList
    let ma = med as
        mb = med bs
    print $ mb - ma + 1

med as | odd m = head $ drop (m `div` 2) as
       | even m = sum . take 2 $ drop (m `div` 2 - 1) as 
    where m = length as