AT_abc434_e [ABC434E] Distribute Bunnies
Description
There are $ N $ rabbits numbered $ 1 $ to $ N $ on a number line. Rabbit $ i $ is at coordinate $ X_i $ . Multiple rabbits may be at the same coordinate.
Each rabbit has a parameter called **jumping power**, and rabbit $ i $ has jumping power $ R_i $ .
Now, all rabbits will jump exactly once. When a rabbit at coordinate $ x $ with jumping power $ r $ jumps, it moves to coordinate $ x+r $ or coordinate $ x-r $ .
If you can freely choose which coordinate each rabbit jumps to, find the maximum possible number of distinct coordinates where rabbits are present after all rabbits have jumped.
Input Format
The input is given from Standard Input in the following format:
> $ N $ $ X_1 $ $ R_1 $ $ X_2 $ $ R_2 $ $ \vdots $ $ X_N $ $ R_N $
Output Format
Output the maximum possible number of distinct coordinates where rabbits are present after jumping.
Explanation/Hint
### Sample Explanation 1
If each rabbit moves as shown below, it is possible to achieve $ 3 $ as the number of distinct coordinates where rabbits are present after jumping, and this is the maximum possible.
- Rabbit $ 1 $ moves to $ 4 - 1 = 3 $ .
- Rabbit $ 2 $ moves to $ 2 + 3 = 5 $ .
- Rabbit $ 3 $ moves to $ 4 - 5 = -1 $ .
### Sample Explanation 2
If each rabbit moves as shown below, it is possible to achieve $ 4 $ as the number of distinct coordinates where rabbits are present after jumping, and this is the maximum possible.
- Rabbit $ 1 $ moves to $ 2 - 1 = 1 $ .
- Rabbit $ 2 $ moves to $ 3 + 2 = 5 $ .
- Rabbit $ 3 $ moves to $ 6 + 1 = 7 $ .
- Rabbit $ 4 $ moves to $ 5 + 2 = 7 $ .
- Rabbit $ 5 $ moves to $ 4 - 3 = 1 $ .
- Rabbit $ 6 $ moves to $ 4 - 1 = 3 $ .
### Constraints
- $ 1 \leq N \leq 2 \times 10^5 $
- $ -10^9 \leq X_i \leq 10^9 $
- $ 1 \leq R_i \leq 10^9 $
- All input values are integers.