Shashank is playing a game with his friends.
There are n sticks located in a row at points $a_1,a_2, ...,a_n$. Each stick has a height- $h_i$. A person can chop a stick down, after which it takes over one of the regions [$a_i$ - $h_i$, $a_i$] or [$a_i$, $a_i$ + $h_i$]. The stick that is not chopped remains at the point $a_i$. A person can chop a stick in a particular direction if the region to be taken up by the chopped stick does not overlap with an already existing point. The winner $($s$)$ of the game will be one or more people who can answer the question: What is the maximum number of sticks that can be chopped?
Shashank wants to win the game and hence he needs needs your help in finding out what is the maximum number of sticks that can be chopped down.

-----Input:-----
- The first line of each input contains a single integer n.
- n lines follow. Each of the n lines contain a pair of integers: $a_i,h_i$.

-----Output:-----
Output in a single line answer- the maximum number of sticks that can be chopped down.

-----Constraints-----
- $1 \leq n \leq 10^5$
- $1 \leq a_i,h_i \leq 10^9$
- The pairs are given in the order of ascending $a_i$. No two sticks are located at the same point.

-----Sample Input 1:-----
5
1 2
2 1
5 10
10 9
19 1

-----Sample Input 2:-----
5
1 2
2 1
5 10
10 9
20 1

-----Sample Output 1:-----
3

-----Sample Output 2:-----
4

-----EXPLANATION:-----
In the first example you can fell the sticks as follows:
- chop the stick 1 to the left — now it will take over the region $[ - 1;1]$
- chop the stick 2 to the right — now it will take over the region $[2;3]$
- spare the stick 3— it will take over the point $5$
- spare the stick 4— it will take over the point $10$
- chop the stick 5 to the right — now it will take over the region $[19;20]$

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = "n = int(input())\nmainlist = []\nchoppedlist = []\nfor i in range(0,n):\n mainlist.append(input().split())\n\nfor i in range(0,n):\n mainlist[i][0] = int(mainlist[i][0])\n mainlist[i][1] = int(mainlist[i][1])\n\n# print('typeis ',type(mainlist[0][0]))\n\ndef checkifpossible(mainlist, sublist, right, pos):\n # print('sublist is ', sublist)\n # print('mainlist is ', mainlist)\n returncode = True\n\n if right:\n  for i in range(pos+1, n):\n   # print('at right value of m and s are ', mainlist[i][0], ' ', \xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0sublist[1])\n   if mainlist[i][0] <= sublist[1]:\n    returncode = False\n else:\n  for i in range(0, pos):\n   # print('value of m and s are ', mainlist[i][0], ' ', sublist[0])\n   if mainlist[i][0] >= sublist[0]:\n    # print('setting to False')\n    returncode = False\n for j in range(0,len(choppedlist)):\n  if choppedlist[j][1] >= sublist[0] and not right:\n   # print('overlapping chopped list')\n   returncode = False\n\n return returncode\n\n\ndef choptreetoright(mainlist, pos):\n nonlocal choppedlist\n sublist = []\n sublist.append(mainlist[pos][0])\n sublist.append(mainlist[pos][0] + mainlist[pos][1])\n right = True\n\n if checkifpossible(mainlist, sublist, right, pos) == True:\n  choppedlist.append(sublist)\n  return True\n else:\n  return False\n\ndef choptreetoleft(mainlist, pos):\n nonlocal choppedlist\n sublist = []\n sublist.append(mainlist[pos][0] - mainlist[pos][1])\n sublist.append(mainlist[pos][0])\n right = False\n if checkifpossible(mainlist, sublist, right, pos) == True:\n  choppedlist.append(sublist)\n  return True\n else:\n  return False\n\nif n >= 2:\n counter = 2\nelif n == 1:\n counter = 1\nelse:\n counter = 0\n\nfor i in range (1, n-1):\n # print('calling left with i ', i)\n if choptreetoleft(mainlist, i):\n  counter = counter + 1\n  continue\n # print('calling right with i ', i)\n if choptreetoright(mainlist, i):\n  counter = counter + 1\n\n# print('chopped list ', choppedlist)\nprint(counter)"
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: