#abc361f. F - x = a^b

F - x = a^b

Score : 500500 points

问题陈述

在1到N(包括1和N)之间有多少个整数xx可以表示为x=abx = a^b,其中aabb是正整数,且bb不小于2

以上为大语言模型 kimi 翻译,仅供参考。

Problem Statement

How many integers xx between 11 and NN, inclusive, can be expressed as x=abx = a^b using some positive integer aa and a positive integer bb not less than 22?

Constraints

  • All input values are integers.
  • 1N10181 \le N \le 10^{18}

Input

The input is given from Standard Input in the following format:

NN

Output

Print the answer as an integer.

Sample Input 1

99

Sample Output 1

12

The integers that satisfy the conditions in the problem statement are 1,4,8,9,16,25,27,32,36,49,64,811, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81: there are 1212.

Sample Input 2

1000000000000000000

Sample Output 2

1001003332