program atcoder
implicit none
integer :: n , i , num , f1 , yakusuu
read *, n
num = 0
do i = 1 , n
  f1 = yakusuu(i)
  num = num + f1 * i
end do
print *,num
end program atcoder

function yakusuu(n)
implicit none
integer :: n , yakusuu , i
yakusuu = 0
do i = 1 , n
  if(mod(n,i) == 0)then
    yakusuu = yakusuu + 1
  end if
end do
end function yakusuu

