program key2020_B
    implicit none
    integer(16)::N
    integer(16),allocatable,dimension(:)::X,L
    integer(16)::ANS
    logical(16),allocatable,dimension(:)::IN
    integer(16)::R
    integer(16)::i

    read*,N
    allocate(X(N),L(N))
    do i=1,N
        read*,X(i),L(i)
    end do
    call heapsortPair(N,X,L)
    allocate(IN(N))
    IN=.True.
    ANS=N
    R=X(1)+L(1)
    do i=2,N
        if(X(i)-L(i)<R)then
            ANS=ANS-1
            if(X(i)+L(i)<R)then
                R=X(i)+L(i)
            endif
        else
            R=X(i)+L(i)
        endif
    end do
    print"(i0)",ans
contains
subroutine HeapsortPair(n,array,array2)
  implicit none
!ここの入力は状況に応じて変更すること
  integer(16),intent(in) :: n
  integer(16),intent(inout) :: array(1:n),array2(1:n)
  integer(16)::i,k,j,l
  integer(16):: t,t2

  l=n/2+1
  k=n
  do while(k /= 1)
     if(l > 1)then
        l=l-1
        t=array(L)
        t2=array2(L)
     else
        t=array(k)
        t2=array2(k)
        array(k)=array(1)
        array2(k)=array2(1)
        k=k-1
        if(k == 1) then
           array(1)=t
           array2(1)=t2
           exit
        endif
     endif
     i=l
     j=l+l
     do while(j<=k)
        if(j < k)then
           if(array(j) < array(j+1))j=j+1
        endif
        if (t < array(j))then
           array(i)=array(j)
           array2(i)=array2(j)
           i=j
           j=j+j
        else
           j=k+1
        endif
     enddo
     array(i)=t
     array2(i)=t2
  enddo
  return
end subroutine HeapsortPair

    
end program key2020_B