let () = Scanf.scanf "%d" @@ fun n ->
  let sum = ref 0 in
  let dp = Array.make (n + 1) 0 in
  for i = 1 to n do
    let rec iter j =
      if j <= n then (dp.(j) <- j + dp.(j); iter (i + j)) in
    iter i;
    sum := !sum + dp.(i);
  done;
  Printf.printf "%d\n" !sum
