program answer
  implicit none

  integer(8) :: N, i, sum

  read(*,*) N
  sum = 0
  do i = 1, N
     sum = sum + i*yaku(i)
  end do

  write(*,*) sum
  
  stop
contains
  integer(8) function yaku(x)
    implicit none

    integer(8) :: i, x, count

    count=0

    do i = 1, x
       if(mod(x,i)==0) then
          count = count + 1
       end if
    end do

    yaku=count
  end function yaku

  end program answer
       
