n=int(eval(input()))

rob=[list(map(int,input().split())) for i in range(n)]

rob=[[sum(rob[i]), rob[i][0]-rob[i][1]] for i in range(n)]

rob.sort(key=lambda i:i[0])

robp=[rob[i][0] for i in range(n)]

robm=[rob[i][1] for i in range(n)]

#print(robp)

#print(robm)



ans=0

x=-10**9

for i in range(n):

  if x<=robm[i]:

    ans+=1

    x=robp[i]

print(ans)
INF = 10 ** 9

MOD = 10 **9 + 7

import sys

sys.setrecursionlimit(100000000)

dy = (-1,0,1,0)

dx = (0,1,0,-1)

from  collections import deque

from math import factorial



def main():

    n = int(eval(input()))

    Robot = [tuple(map(int,input().split())) for _ in range(n)]

    Robot.sort(key = lambda x: sum(x))



    ans = n

    now = -INF

    for i in range(n):

        if now <= Robot[i][0] - Robot[i][1]:

            now = sum(Robot[i])

        else:

            ans -= 1

    print(ans)

if __name__=='__main__':

    main()

n = int(eval(input()))
rob = [list(map(int, input().split())) for i in range(n)]
rob = [[sum(rob[i]), rob[i][0] - rob[i][1]] for i in range(n)]
rob.sort(key=lambda i: i[0])
robp = [rob[i][0] for i in range(n)]
robm = [rob[i][1] for i in range(n)]
# print(robp)
# print(robm)
ans = 0
x = -(10**9)
for i in range(n):
    if x <= robm[i]:
        ans += 1
        x = robp[i]
print(ans)

INF = 10**9
MOD = 10**9 + 7
import sys

sys.setrecursionlimit(100000000)
dy = (-1, 0, 1, 0)
dx = (0, 1, 0, -1)
from collections import deque
from math import factorial


def main():
    n = int(eval(input()))
    Robot = [tuple(map(int, input().split())) for _ in range(n)]
    Robot.sort(key=lambda x: sum(x))
    ans = n
    now = -INF
    for i in range(n):
        if now <= Robot[i][0] - Robot[i][1]:
            now = sum(Robot[i])
        else:
            ans -= 1
    print(ans)


if __name__ == "__main__":
    main()

-n = int(eval(input())) -rob = [list(map(int, input().split())) for i in range(n)] -rob = [[sum(rob[i]), rob[i][0] - rob[i][1]] for i in range(n)] -rob.sort(key=lambda i: i[0]) -robp = [rob[i][0] for i in range(n)] -robm = [rob[i][1] for i in range(n)] -# print(robp) -# print(robm) -ans = 0 -x = -(10**9) -for i in range(n): -    if x <= robm[i]: -        ans += 1 -        x = robp[i] -print(ans) +INF = 10**9 +MOD = 10**9 + 7 +import sys + +sys.setrecursionlimit(100000000) +dy = (-1, 0, 1, 0) +dx = (0, 1, 0, -1) +from collections import deque +from math import factorial + + +def main(): +    n = int(eval(input())) +    Robot = [tuple(map(int, input().split())) for _ in range(n)] +    Robot.sort(key=lambda x: sum(x)) +    ans = n +    now = -INF +    for i in range(n): +        if now <= Robot[i][0] - Robot[i][1]: +            now = sum(Robot[i]) +        else: +            ans -= 1 +    print(ans) + + +if __name__ == "__main__": +    main()