import java.util.Scanner

object Main extends App {

  def readALine(c:Int, ac:List[Long]=Nil):List[Long] =
    if (c > 0) readALine(c-1, sc.nextLong::ac) else ac.reverse
  // def readLines(r:Int, c:Int, ac:List[List[Int]]):List[List[Int]] =
  //   if (r > 0) readLines(r-1, c, readALine(c, Nil)::ac) else ac.reverse
  val sc = new Scanner(System.in)
  val N = sc.nextInt

  def makePrime():(()=>Long, ()=>Unit) = {
    def eratosthenes(sieve:List[Long], primes:List[Long]):List[Long] = {
      if (sieve.isEmpty) primes.reverse
      else eratosthenes(sieve.tail.filter(_ % sieve.head != 0), sieve.head::primes)
    }
    val primes:Array[Long] = eratosthenes(List.range(3, 9999, 2), List(2)).toArray
    // println(primes.mkString(","))
    var num = 0
    val limit = primes.length
    (() => { if (num < limit) {num +=1; primes(num-1)} else throw new NoSuchElementException },
     () => { num = 0})
  }

  val (generator, resetGenerator) = makePrime()
 
  def factorize(n:Long):List[(Long, Long)] = {
    require(n > 0, "n must be a positive integer.")

    def iter(n:Long, ac:List[(Long, Long)]):List[(Long, Long)] = {
      def isDivided(n:Long, d:Long):Boolean = n % d == 0
      def iterDev(n:Long, d:Long, c:Long):(Long, Long) =
        if (isDivided(n, d)) iterDev(n/d, d, c+1) else (n, c)
      
      val div = generator()
      // println(s"n:$n ac:$ac div:$div")
      n match {
        case 1 => ac
        case n if n < div*div => (n, 1L)::ac
        case _ => {
          val (q, c) = iterDev(n, div, 0)
          if (c > 0) iter(q, (div, c)::ac) else iter(q, ac)
        }
      }
    }

    resetGenerator()
    iter(n, List()).reverse  
  }

  def countDivisor(ls:List[(Long,Long)], count:Long):Long = {
    // println(s"ls:$ls count:$count")
    if (ls.isEmpty) count else {
      val (p, e) = ls.head
      countDivisor(ls.tail, count*(e+1)) 
    }
  }
  def solver(n:Long, sum:Long):Long = 
    if (n > 0) solver(n -1, sum + n*countDivisor(factorize(n), 1)) else sum

  println(solver(N, 0))

}