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.
class Tree:
    coordinate = 0
    height = 0
    left = True
    right = True
    wide = True

    def __init__(self, coordinate_i, height_i):
        self.coordinate = coordinate_i
        self.height = height_i
# 化院 荆屹然 2300011884


def left_check(num):
    cover = trees[num].coordinate - trees[num].height
    if trees[num - 1].coordinate >= cover:
        return False
    else:
        return True


def right_check(num):
    cover = trees[num].coordinate + trees[num].height
    if trees[num + 1].coordinate <= cover:
        return False
    else:
        return True


def wide_check(num):
    if trees[num].coordinate - trees[num - 1].coordinate >= trees[num].height + trees[num - 1].height:
        return True
    else:
        return False


def cut(first, last, wide):
    if wide:
        return last - first + 1
    else:
        return last - first


trees = []
n = int(input())
for i in range(0, n):
    coordinate, height = map(int, input().split())
    trees.append(Tree(coordinate, height))
trees[0].right = right_check(0)
trees[n - 1].left = left_check(n - 1)
count = 1
start_num = 1
now_num = 1
if_start = False
if_wide = False
while now_num < n - 1:
    trees[now_num].left = left_check(now_num)
    trees[now_num].right = right_check(now_num)
    trees[now_num].wide = wide_check(now_num)
    if not if_start:
        if trees[now_num].left:
            count += 1
        elif trees[now_num].right:
            if_start = True
            start_num = now_num
        now_num += 1
    else:
        if not if_wide:
            if_wide = wide_check(now_num)
        if not trees[now_num].left and not trees[now_num].right:
            count += cut(start_num, now_num - 1, True)
            if_start = False
            if_wide = False
        if not trees[now_num].left and trees[now_num].right:
            count += cut(start_num, now_num - 1, True)
            start_num = now_num
            if_wide = False
        if trees[now_num].left and not trees[now_num].right:
            count += cut(start_num, now_num, if_wide)
            if_start = False
            if_wide = False
        now_num += 1
if if_start:
    count += cut(start_num, n - 2, True)
count += 1
print(count)
# 化院 荆屹然 2300011884
