N = int(eval(input()))

XL = [list(map(int, input().split())) for _ in range(N)]



t = [(x + l, x - l) for x, l in XL]

t.sort()

max_r = -float('inf')

result = 0

for i in range(N):

    r, l = t[i]

    if max_r <= l:

        result += 1

        max_r = r

print(result)
from operator import itemgetter



def solve():

    N = int(eval(input()))

    X = []

    for i in range(N):

        xx, ll = list(map(int, input().split()))

        X.append((xx-ll, xx+ll))

    X.sort(key=itemgetter(1))

    count = 0

    cur = -float('inf')

    for i in range(N):

        c, d = X[i]

        if cur <= c:

            count += 1

            cur = d

    return count



print((solve()))

N = int(eval(input()))
XL = [list(map(int, input().split())) for _ in range(N)]
t = [(x + l, x - l) for x, l in XL]
t.sort()
max_r = -float("inf")
result = 0
for i in range(N):
    r, l = t[i]
    if max_r <= l:
        result += 1
        max_r = r
print(result)

from operator import itemgetter


def solve():
    N = int(eval(input()))
    X = []
    for i in range(N):
        xx, ll = list(map(int, input().split()))
        X.append((xx - ll, xx + ll))
    X.sort(key=itemgetter(1))
    count = 0
    cur = -float("inf")
    for i in range(N):
        c, d = X[i]
        if cur <= c:
            count += 1
            cur = d
    return count


print((solve()))

-N = int(eval(input())) -XL = [list(map(int, input().split())) for _ in range(N)] -t = [(x + l, x - l) for x, l in XL] -t.sort() -max_r = -float("inf") -result = 0 -for i in range(N): -    r, l = t[i] -    if max_r <= l: -        result += 1 -        max_r = r -print(result) +from operator import itemgetter + + +def solve(): +    N = int(eval(input())) +    X = [] +    for i in range(N): +        xx, ll = list(map(int, input().split())) +        X.append((xx - ll, xx + ll)) +    X.sort(key=itemgetter(1)) +    count = 0 +    cur = -float("inf") +    for i in range(N): +        c, d = X[i] +        if cur <= c: +            count += 1 +            cur = d +    return count + + +print((solve()))