#abc193c. [abc193_c]Unexpressed

[abc193_c]Unexpressed

Problem Statement

Given is an integer NN. How many integers between 11 and NN (inclusive) are unrepresentable as aba^b, where aa and bb are integers not less than 22?

Constraints

  • NN is an integer.
  • 1N10101 ≤ N ≤ 10^{10}

Input

Input is given from Standard Input in the following format:

NN

Output

Print the answer.


Sample Input 1

8

Sample Output 1

6

44 and 88 are representable as aba^b: we have 22=42^2 = 4 and 23=82^3 = 8.
On the other hand, 11, 22, 33, 55, 66, and 77 are unrepresentable as aba^b using integers aa and bb not less than 22, so the answer is 66.


Sample Input 2

100000

Sample Output 2

99634