import sys

input = sys.stdin.buffer.readline

from operator import itemgetter



def main():

    N = int(eval(input()))

    lr = []

    for _ in range(N):

        p,l = list(map(int,input().split()))

        lr.append((p-l,p+l))

        

    lr.sort(key = itemgetter(1,0))

    now = -10**10

    count = 0

    for i in range(N):

        if now <= lr[i][0]:

            count += 1

            now = lr[i][1]

        

    print(count)

    

if __name__ == "__main__":

    main()

import sys

input = sys.stdin.buffer.readline

from operator import itemgetter



def main():

    N = int(eval(input()))

    arm = []

    for _ in range(N):

        x,l = list(map(int,input().split()))

        arm.append((x-l,x+l))

    

    count = 0

    arm.sort(key=itemgetter(1))

    

    right = -10**10

    for l,r in arm:

        if right <= l:

            right = r

            count += 1

    

    print(count)

    

if __name__ == "__main__":

    main()

import sys

input = sys.stdin.buffer.readline
from operator import itemgetter


def main():
    N = int(eval(input()))
    lr = []
    for _ in range(N):
        p, l = list(map(int, input().split()))
        lr.append((p - l, p + l))
    lr.sort(key=itemgetter(1, 0))
    now = -(10**10)
    count = 0
    for i in range(N):
        if now <= lr[i][0]:
            count += 1
            now = lr[i][1]
    print(count)


if __name__ == "__main__":
    main()

import sys

input = sys.stdin.buffer.readline
from operator import itemgetter


def main():
    N = int(eval(input()))
    arm = []
    for _ in range(N):
        x, l = list(map(int, input().split()))
        arm.append((x - l, x + l))
    count = 0
    arm.sort(key=itemgetter(1))
    right = -(10**10)
    for l, r in arm:
        if right <= l:
            right = r
            count += 1
    print(count)


if __name__ == "__main__":
    main()

-    lr = [] +    arm = [] -        p, l = list(map(int, input().split())) -        lr.append((p - l, p + l)) -    lr.sort(key=itemgetter(1, 0)) -    now = -(10**10) +        x, l = list(map(int, input().split())) +        arm.append((x - l, x + l)) -    for i in range(N): -        if now <= lr[i][0]: +    arm.sort(key=itemgetter(1)) +    right = -(10**10) +    for l, r in arm: +        if right <= l: +            right = r -            now = lr[i][1]