Given a prime number , consider the set Z_p = \{0, 1, \ldots, p-1\}—the field of remainders modulo . In this field, both multiplication and addition are performed modulo .
Now, consider the set of monic polynomials over this field of the form
where is the degree of the polynomial, is the variable, and a_i \in Z_p are coefficients.
For example, the polynomial x^2 + x + 1 in the field Z_2 is irreducible. A monic polynomial is called irreducible if it cannot be represented as f(x) = p(x) \cdot q(x), where and are polynomials of lower degree than . Notably, this is the only irreducible polynomial of degree two in Z_2.
Your task is to compute the number of irreducible monic polynomials of degree in the field Z_p.
The input consists of a single line containing two integers and (1 \leq p, n \leq 10^9, 1 \leq p^n < 10^{18}).
Output the number of irreducible monic polynomials of degree in the field Z_p.
Example 1