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

#SP0000031. Trò chơi chia số (Div Game)

HỌC THEO LỘ TRÌNH

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

1 lộ trình

Trò chơi chia số (Div Game)

Div Game

Source: AtCoder

Version: Phuoc Hung OJ Extended

Problem Statement

You are given a positive integer NN. You may repeat the following operation:

  • Choose a positive integer z=pez=p^e, where pp is prime and e≥1e\ge1.
  • The value zz must divide the current value of NN.
  • The value zz must not have been chosen in an earlier operation.
  • Replace NN with N/zN/z.

Find the maximum number of operations possible. Values zz must be distinct, but different powers of the same prime are allowed.

Input

One line containing the positive integer NN.

Output

Output the maximum possible number of operations as one integer.

Subtasks

  • Subtask 1 (20 points): 1≤N≤1051\le N\le10^5.
  • Subtask 2 (30 points): 1≤N≤1091\le N\le10^9.
  • Subtask 3 (50 points): 1≤N≤10121\le N\le10^{12}.

Examples

Input

24

Output

3

Explanation

Start with N=24N=24. Choose z=2z=2 to obtain N=12N=12, then z=3z=3 to obtain N=4N=4, and finally z=4z=4 to obtain N=1N=1. The three chosen prime powers are distinct, giving 33 operations.

Input

64

Output

3

Explanation

Starting at 64=2664=2^6, choose 22, 44, 88. Their exponents sum to 1+2+3=61+2+3=6, exhausting NN in 33 moves.

Input

1

Output

0

Explanation

The integer 11 has no divisor of the form pep^e with e≥1e\ge1, so no move is possible.