Dr. Doofenshmirtz did something to the space-time continuum.
Now there are one billion days, one billion locks, and one billion keys. This is the type of thing that only happens in cartoons and math problems!!
1,000,000,000 days of summer vacation and school comes along just to end it! For the rest of summer vacation, Dr. Doofenshmirtz will occasionally be doing things to take over the Greater Tri-State Area and Perry the Platypus has to stop him.
The good news is that Agent P has managed to make an imprint of a set of keys and duplicate all of them. The bad news is that each day, Perry will be locked inside a different room with a different lock. And the set of keys he has might not have a correct key to open the lock on some days.
There are a total of 1,000,000,000 different locks, one for each day of summer vacation, and there are 1,000,000,000 different keys. As before, each key can open a lock if the difference between their numbers is exactly one. To be more explicit:
You will be given the set of keys that Perry the Platypus has as well as the lock numbers on the days that Dr. Doofenshmirtz will be active.
Output how many days Perry can successfully stop the mad doctor.
Each test case consists of four lines.
The first line contains an integer $k$, the number of keys that Perry has.
The second line contains $k$ space-separated integers representing each key $k_i$.
The third line contains an integer $L$, the number of locks.
The fourth line contains $L$ space-separated integers, representing each lock $L_i$.
*Constraints*
$1 <= k <= 10^5$
$1 <= k_i <= 10^9$
$1 <= L <= 10^5$
$1 <= L_i <= 10^9$
No two $k_i$s are the same.
No two $L_i$s are the same.
Output a single integer, the number of days that Perry can successfully stop Dr. Doofenshmirtz.
## Input
Each test case consists of four lines.The first line contains an integer $k$, the number of keys that Perry has.The second line contains $k$ space-separated integers representing each key $k_i$.The third line contains an integer $L$, the number of locks.The fourth line contains $L$ space-separated integers, representing each lock $L_i$.*Constraints*$1 <= k <= 10^5$ $1 <= k_i <= 10^9$ $1 <= L <= 10^5$ $1 <= L_i <= 10^9$ No two $k_i$s are the same. No two $L_i$s are the same.
## Output
Output a single integer, the number of days that Perry can successfully stop Dr. Doofenshmirtz.
[samples]
**Definitions**
Let $ q \in \mathbb{Z}^+ $ be the number of qualities.
Let $ g \in \mathbb{R}^+ $ be Kouhai’s growth rate limit.
Let $ W = (W_1, \dots, W_q) \in \mathbb{R}^q $ be the weight vector for qualities.
Let $ F = (F_1, \dots, F_q) \in \mathbb{R}^q $ be Senpai’s change rate factors.
Let $ C = (C_1, \dots, C_q) \in \mathbb{R}^q $ be Senpai’s constant factors.
Let $ S_i(t) = F_i t + C_i $ for $ i \in \{1, \dots, q\} $.
Let $ P_i(t) : \mathbb{R}_{\geq 0} \to \mathbb{R} $ be continuously differentiable functions with $ P_i(0) = 0 $ for all $ i $.
**Constraints**
1. $ \sum_{i=1}^{q} \left( \frac{d}{dt} P_i(t) \right)^2 \leq g^2 $ for all $ t \geq 0 $.
2. $ P_i(0) = 0 $ for all $ i \in \{1, \dots, q\} $.
**Objective**
Find the minimal $ t \geq 0 $ such that there exist functions $ P_i(t) $ satisfying the constraints and:
$$
\sum_{i=1}^{q} S_i(t) \leq \sum_{i=1}^{q} W_i P_i(t)
$$
i.e.,
$$
\sum_{i=1}^{q} (F_i t + C_i) \leq \sum_{i=1}^{q} W_i P_i(t)
$$