defmodule Main do
  def main do
    IO.read(:line)
    |> String.trim()
    |> String.to_integer()
    |> solve()
    |> IO.puts()
  end
 
  def divisors(1), do: 1
  def divisors(n), do: divisors(1,n,:math.sqrt(n), 0)
 
  defp divisors(k,_n,q, count) when k>q, do: count
  defp divisors(k,n,q, count) when rem(n,k)>0, do: divisors(k+1,n,q,count)
  defp divisors(k,n,q, count) when k * k == n, do: divisors(k+1,n,q, count + 1)
  defp divisors(k,n,q, count)                , do: divisors(k+1,n,q, count + 2)
 
  def solve(n) do
    1..n
    |> Enum.reduce(0, fn k, acc_answer -> acc_answer + k * divisors(k) end)
  end
end