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
    integer(8), allocatable :: count(:)
    allocate(count(N))
    count=0
    ans=1
    i=2
    ss=N
    do
       if(ss==1) then
          exit
       end if
       if(i<=int(sqrt(dble(N)))) then
          do
             if(mod(ss,i)==0) then
                ss=ss/i
                count(i)=count(i)+1
             else
                i=i+1
                exit
             end if
          end do
       else
          exit
       end if
    end do
    if(ss>int(sqrt(dble(N)))) then
       count(ss)=count(ss)+1
    end if
    do i = 1, N
       ans=ans*(count(i)+1)
    end do
  end subroutine yaku
 end program answer
