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