PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#SP0000075. Đếm thừa số nguyên tố của các ước (Count Primes)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Đếm thừa số nguyên tố của các ước (Count Primes)

Count Primes

Source: SPOJ

Version: Phuoc Hung OJ Extended

Problem Statement

Given a positive integer NN, consider all positive divisors dd of NN. For each dd, count its prime factors with multiplicity. For example, 12=2⋅2⋅312=2\cdot2\cdot3 contributes three factors. Compute the sum of those multiplicity-counted prime-factor counts over all positive divisors of NN. The integer 11 has zero prime factors.

Input

One line contains the positive integer NN.

Output

Print one integer: the sum of prime-factor counts with multiplicity over all positive divisors of NN.

Subtasks

  • Subtask 1 (20 points): 1≤n≤1001\le n\le 100.
  • Subtask 2 (30 points): 1≤n≤10001\le n\le 1000.
  • Subtask 3 (50 points): 1≤n≤100001\le n\le 10000.

Examples

Input

6

Output

4

Explanation

The positive divisors of 66 are 1,2,3,61,2,3,6. Their prime-factor counts with multiplicity are 0,1,1,20,1,1,2, respectively, because 6=2⋅36=2\cdot3. The total is 0+1+1+2=40+1+1+2=4.