import Data.Array.IO
import Control.Monad

main = getLine >>= compute . read >>= print

compute :: Int -> IO Int
compute n = do
    arr0 <- (newArray (1,n) 1) :: IO (IOUArray Int Int)
    arr <- loop 2 arr0
    as <- getAssocs arr
    return $ sum $ map (uncurry (*)) as  
  where
    loop k arr
      | k > n = return arr
      | True  = do
          mapM (incr arr) [k,k+k..n]
          loop (succ k) arr
    incr arr k = do
      v <- readArray arr k
      writeArray arr k (succ v)
