object Main extends App {
  import scala.io.StdIn._


  val prime = primes(1000000)
  solve

  def solve: Unit = {
    val l = readLong
    if (l == 0) return
    var exp = Nil: List[Int]
    var n = l
    for (p ← prime if n % p == 0){
      var e = 0
      while(n % p == 0){
        n /= p
        e += 1
      }
      exp ::= e
    }
    if (n != 1)  exp ::= 1
    println(calCombination(exp))
    solve
  }
  def calCombination(exponents: List[Int]): Long = {
    if (exponents.isEmpty) return 1
    val combinationMemo = Array.tabulate(exponents.length){_ ⇒ -1L}
    combinationMemo(0) = 1
    def sub(current: Int, exp: List[Int]): Long = {
      if (combinationMemo(current) == -1){
        combinationMemo(current) = sub(current - 1, exp.tail) * (2 * exp.head + 1)
      }
      combinationMemo(current)
    }
    def sub2(current: Int, exp: List[Int]): Long = {
      exp match {
        case Nil ⇒ 1
        case h::t ⇒ sub2(current - 1, t) + sub(current - 1, t) * h
      }
    }
    sub2(exponents.length, exponents)
  }
  def primes(upper: Int): Array[Int] = {
    val memo = Array.tabulate(upper + 1){_ ⇒ true}
    for (i ← 2 to math.sqrt(upper).toInt) {
      if (memo(i))
        for (j ← i * 2 to upper by i)
          memo(j) = false
    }
    (2 to upper).filter(memo).toArray
  }
  implicit class Scope[T](val value: T) extends AnyVal {
    @inline
    def also(@inline func: T ⇒ Unit): T = {
      func(value)
      value
    }
    @inline
    def let[A](@inline func: T ⇒ A): A = func(value)
  }
}
