#P17281. 「IXOI R2」阴圆

    ID: 19614 远端评测题 1000ms 512MiB 尝试: 0 已通过: 0 显示难度普及− 上传者: 标签>数学洛谷原创O2优化洛谷月赛

「IXOI R2」阴圆

Background

Obito and Rin are a great ship.

Problem Description

Rin has nn integers 1∼n1 \sim n.

Obito can now choose at least 22 numbers and obtain their greatest common divisor. After each choice, the numbers are not removed, and the next time he can choose repeatedly.

Obito can make any number of choices. Ask how many different numbers he can obtain.

Input Format

One line with one integer nn.

Output Format

One line, output the answer.

3
1
4
2

Hint

Sample Explanation

Sample #1:

The greatest common divisors are gcd⁡(1,2)=1,gcd⁡(1,3)=1,gcd⁡(2,3)=1,gcd⁡(1,2,3)=1\gcd(1,2)=1,\gcd(1,3)=1,\gcd(2,3)=1,\gcd(1,2,3)=1, so there is one in total.

Sample #2:

It can be obtained that there are two different greatest common divisors in total.

Constraints

This problem uses bundled testdata.

Subtask n≤n\le Score
11 40004000 2020
22 10610^6 3030
33 101810^{18} 5050

For all data, it is guaranteed that:

1≤n≤10181\le n \le 10^{18}。

Translated by ChatGPT 5