import Data.List

main = getLine >>= print . compute . read

compute :: Integer -> Integer
compute n = sum $ map f [1..n]

f k = k * (product $ map (fromIntegral.succ.length) $ group $ primeFactors k)

primes = 2 : 3 : 5 : sieve [(9,3),(10,5)] [7,9..]

sieve ((q,p):qps) xxs@(x:xs) =
  case compare q x of
    LT -> sieve qps1 xxs
    EQ -> sieve qps1 xs
    GT -> x : sieve (insert (x+x,x) qps) xs
  where
    qps1 = insert (q+p,p) qps
-- このinsertをヒープに変えるともっと速くなる。

primeFactors n = loop n primes
  where
    loop 1 _ = []
    loop n pps@(p:ps)
      | r == 0 = p : loop q pps
      | q < p  = [n]
      | True   = loop n ps
      where (q,r) = divMod n p