Little Susie listens to fairy tales before bed every day. Today's fairy tale was about wood cutters and the little girl immediately started imagining the choppers cutting wood. She imagined the situation that is described below.

There are *n* trees located along the road at points with coordinates *x*<sub class="lower-index">1</sub>, *x*<sub class="lower-index">2</sub>, ..., *x*<sub class="lower-index">*n*</sub>. Each tree has its height *h*<sub class="lower-index">*i*</sub>. Woodcutters can cut down a tree and fell it to the left or to the right. After that it occupies one of the segments [*x*<sub class="lower-index">*i*</sub> - *h*<sub class="lower-index">*i*</sub>, *x*<sub class="lower-index">*i*</sub>] or [*x*<sub class="lower-index">*i*</sub>;*x*<sub class="lower-index">*i*</sub> + *h*<sub class="lower-index">*i*</sub>]. The tree that is not cut down occupies a single point with coordinate *x*<sub class="lower-index">*i*</sub>. Woodcutters can fell a tree if the segment to be occupied by the fallen tree doesn't contain any occupied point. The woodcutters want to process as many trees as possible, so Susie wonders, what is the maximum number of trees to fell.
The first line contains integer *n* (1 ≤ *n* ≤ 10<sup class="upper-index">5</sup>) — the number of trees.

Next *n* lines contain pairs of integers *x*<sub class="lower-index">*i*</sub>, *h*<sub class="lower-index">*i*</sub> (1 ≤ *x*<sub class="lower-index">*i*</sub>, *h*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">9</sup>) — the coordinate and the height of the *і*-th tree.

The pairs are given in the order of ascending *x*<sub class="lower-index">*i*</sub>. No two trees are located at the point with the same coordinate.
# ﷽
from collections import deque
import sys
input = lambda: sys.stdin.readline().strip()
mod=7+10**9


# class FenwickTree:
#     def __init__(self, x):
#         bit = self.bit = list(x)
#         size = self.size = len(bit)
#         for i in range(size):
#             j = i | (i + 1)
#             if j < size:
#                 bit[j] += bit[i]

#     def update(self, idx, x):
#         """updates bit[idx] += x"""
#         while idx < self.size:
#             self.bit[idx] += x
#             idx |= idx + 1

#     def __call__(self, end):
#         """calc sum(bit[:end])"""
#         x = 0
#         while end:
#             x += self.bit[end - 1]
#             end &= end - 1
#         return x

#     def find_kth(self, k):
#         """Find largest idx such that sum(bit[:idx]) <= k"""
#         idx = -1
#         for d in reversed(range(self.size.bit_length())):
#             right_idx = idx + (1 << d)
#             if right_idx < self.size and self.bit[right_idx] <= k:
#                 idx = right_idx
#                 k -= self.bit[idx]
#         return idx + 1, k
# class SortedList:
#     block_size = 700

#     def __init__(self, iterable=()):
#         self.macro = []
#         self.micros = [[]]
#         self.micro_size = [0]
#         self.fenwick = FenwickTree([0])
#         self.size = 0
#         for item in iterable:
#             self.insert(item)

#     def insert(self, x):
#         i = lower_bound(self.macro, x)
#         j = upper_bound(self.micros[i], x)
#         self.micros[i].insert(j, x)
#         self.size += 1
#         self.micro_size[i] += 1
#         self.fenwick.update(i, 1)
#         if len(self.micros[i]) >= self.block_size:
#             self.micros[i:i + 1] = self.micros[i][:self.block_size >> 1], self.micros[i][self.block_size >> 1:]
#             self.micro_size[i:i + 1] = self.block_size >> 1, self.block_size >> 1
#             self.fenwick = FenwickTree(self.micro_size)
#             self.macro.insert(i, self.micros[i + 1][0])

#     def pop(self, k=-1):
#         i, j = self._find_kth(k)
#         self.size -= 1
#         self.micro_size[i] -= 1
#         self.fenwick.update(i, -1)
#         return self.micros[i].pop(j)

#     def __getitem__(self, k):
#         i, j = self._find_kth(k)
#         return self.micros[i][j]

#     def count(self, x):
#         return self.upper_bound(x) - self.lower_bound(x)

#     def __contains__(self, x):
#         return self.count(x) > 0

#     def lower_bound(self, x):
#         i = lower_bound(self.macro, x)
#         return self.fenwick(i) + lower_bound(self.micros[i], x)

#     def upper_bound(self, x):
#         i = upper_bound(self.macro, x)
#         return self.fenwick(i) + upper_bound(self.micros[i], x)

#     def _find_kth(self, k):
#         return self.fenwick.find_kth(k + self.size if k < 0 else k)

#     def __len__(self):
#         return self.size

#     def __iter__(self):
#         return (x for micro in self.micros for x in micro)

#     def __repr__(self):
#         return str(list(self))
oo=1+3*10**9
def solve():
    l=deque()
    for i in range(int(input())):
        a,b=[int(i) for i in input().split()]
        l.append((a,b))
    l=sorted(l)+[(oo,oo)]
    right=[l[0][0],1]
    left=[l[0][0],1]
    for i,(x,h) in enumerate(l[1:-1],1):
        tmpright=right.copy()
        tmpleft=left.copy()
        if  x-h>left[0]:tmpleft[1]=max(tmpleft[1],left[1]+1)
        if  x-h>right[0]:tmpleft[1]=max(tmpleft[1],right[1]+1)
        tmpleft[0]=x
        if x+h<l[i+1][0]:
            tmpright[1]=max(right[1]+1,left[1]+1)
            tmpright[0]=x+h
        right=tmpright
        left=tmpleft
    print(max(right[1],left[1]))
         
     
         

if __name__ == "__main__":
    # for i in range(int(input())):
        solve()
