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.
# watchu lookin at?

import sys
from math import *
# from itertools import *
# from heapq import heapify, heappop, heappush
# from bisect import bisect, bisect_left, bisect_right
from collections import deque, Counter, defaultdict as dd
mod = 10**9+7
abc = "abcdefghijklmnopqrstuvwxyz"
# Sangeeta Singh


def input(): return sys.stdin.readline().rstrip("\r\n")
def ri(): return int(input())
def rl(): return list(map(int, input().split()))
def rls(): return list(map(str, input().split()))
def isPowerOfTwo(x): return (x and (not(x & (x - 1))))
def lcm(x, y): return (x*y)//gcd(x, y)
def alpha(x): return ord(x)-ord('A')


def gcd(x, y):
    while y:
        x, y = y, x % y
    return x


def d2b(n):
    s = bin(n).replace("0b", "")
    return (34-len(s))*'0'+s


def highestPowerof2(x):
    x |= x >> 1
    x |= x >> 2
    x |= x >> 4
    x |= x >> 8
    x |= x >> 16
    return x ^ (x >> 1)


def nextPowerOf2(N):
    if not (N & (N - 1)):
        return N
    return int("1" + (len(bin(N)) - 2) * "0", 2)


def isPrime(x):
    if x == 1:
        return False
    if x == 2:
        return True
    for i in range(2, int(x ** 0.5) + 1):
        if x % i == 0:
            return False
    return True


def factors(n):
    i = 1
    ans = []
    while i <= sqrt(n):
        if (n % i == 0):
            if (n / i != i):
                ans.append(int(n/i))
            if i != 1:
                ans.append(i)
        i += 1
    return ans


Primes = [1] * 100001
primeNos = []


def SieveOfEratosthenes(n):
    p = 2
    while (p * p <= n):
        if (Primes[p]):
            for i in range(p * p, n+1, p):
                Primes[i] = 0
        p += 1
    for p in range(2, n+1):
        if Primes[p]:
            primeNos.append(p)

# SieveOfEratosthenes(100000)
# P = len(primeNos)
# print("P", P)


def ncr(n, r):
    ans = 1
    while(r):
        ans *= n
        ans %= mod
        n -= 1
        r -= 1
    return ans

############ Main! #############
# mod = 998244353


def sangee():
    n = ri()
    a = [rl() for i in range(n)]
    if n == 1:
        print(1)
        return
    ans = 2
    # print(a)
    for i in range(1, n-1):
        curr_ind = a[i][0]
        curr_height = a[i][1]
        if curr_ind-curr_height > a[i-1][0]:
            ans += 1
        elif curr_ind+curr_height < a[i+1][0]:
            a[i][0] = curr_ind+curr_height
            ans += 1
    # print(a)
    print(ans)


t = 1
for _ in range(t):
    sangee()
