program sum_of_divisors
  implicit none
  integer :: n, i, j
  integer(8) :: f(10000000) = 0, x = 0
  read(*,*) n
  do i = 1, n
    do j = i, n, i
      f(j) = f(j) + 1
    end do
  end do
  do i = 1, n
    x = x + f(i) * i
  end do
  write(*,'(i0)') x
end program sum_of_divisors