program robot_arms
  implicit none
  integer :: n, i, tmp
  integer, dimension(100000,4) :: r = 0
  read(*,*) n
  do i = 1, n
    read(*,*) r(i,1:2)
    r(i,1) = r(i,1)-r(i,2)
    r(i,3) = i
  end do
  call merge_sort(r(1:n,1:3),1)
  do i = 1, n
    tmp = dfs(i)
  end do
  write(*,'(i0)') maxval(r(1:n,4))
contains
  recursive function dfs(i) result(ret)
    integer, intent(in) :: i
    integer :: ret, x, a, b, c
    if (r(i,4) /= 0) then
      ret = r(i,4)
      return
    end if
    x = r(i,1)+2*r(i,2)
    a = i
    b = n+1
    do while (b-a > 1)
      c = (a+b)/2
      if (r(c,1) >= x) then
        b = c
      else
        a = c
      end if
    end do
    if (b == n+1) then
      ret = 1
    else
      ret = dfs(b)+1
    end if
    r(i,4) = ret
  end
  subroutine merge_sort(a,k)
    integer, intent(inout) :: a(:,:)
    integer, intent(in) :: k
    integer :: n, m, l, i, u
    n = size(a,1)
    m = n
    l = 1
    do while (m > 1)
      do i = 1, m/2
        u = min(2*i*l,n)
        call merger(a(2*(i-1)*l+1:(2*i-1)*l,:),a((2*i-1)*l+1:u,:),k)
      end do
      l = 2*l
      m = (m+1)/2
    end do
  end
  subroutine merger(a1,a2,k)
    integer, intent(inout) :: a1(:,:), a2(:,:)
    integer, intent(in) :: k
    integer :: a(size(a1,1)+size(a2,1),size(a1,2))
    integer :: i1, i2, n1, n2
    i1 = 1
    i2 = 1
    n1 = size(a1,1)
    n2 = size(a2,1)
    do while (i1 <= n1 .and. i2 <= n2)
      if (a1(i1,k) <= a2(i2,k)) then
        a(i1+i2-1,:) = a1(i1,:)
        i1 = i1+1
      else
        a(i1+i2-1,:) = a2(i2,:)
        i2 = i2+1
       end if
    end do
    if (i1 <= n1) then
      a(i1+i2-1:n1+n2,:) = a1(i1:n1,:)
    else
      a(i1+i2-1:n1+n2,:) = a2(i2:n2,:)
    end if
    a1 = a(1:n1,:)
    a2 = a(n1+1:n1+n2,:)
  end
end program robot_arms