program answer
  implicit none
  integer(8) :: i, N, ans, tmp
  read(*,*) N
  ans=0
  do i = 1, N-1
     call yaku(i,tmp)
     ans=ans+tmp
  end do
  write(*,*) ans
  stop
contains
  subroutine yaku(N,ans)
    integer(8) :: i, N, ans, ss
    i=1
    ans=0
    do
       if(i*i>n) then
          exit
       end if
       if(mod(n,i)==0) then
          if(i*i==n) then
             ans=ans+1
          else
             ans=ans+2
          end if
       end if
       i=i+1
    end do
  end subroutine yaku
 end program answer
