Report 3
Participants of the 2011 International Summer School on Programming in Sevastopol might recall a financier's intriguing question: Is it possible for every interval of months of the same length within a reporting period to have negative cumulative indicators, yet the overall cumulative result for the entire period remains positive?
With the help of the school participants, it was discovered that for certain values of N, there exists a number n such that a sequence of length N can be constructed where the total sum is positive, but every segment of length n has a negative sum. For instance, when N=5, choosing n=2 allows for a sequence like 4, -5, 4, -5, 4. Conversely, it's also possible to create a sequence of length N with a negative total sum, while every segment of length n has a positive sum. Such numbers n are termed dangerous relative to N, while all other numbers are considered safe relative to N. We are interested in numbers not exceeding N.
In a certain Region, the level of democracy is so high that each organization can independently decide the length of its reporting period. Moreover, organizations are required to choose unique numbers for their reporting period lengths.
In this Region, two periods N and M are deemed competing if they share at least one common safe number greater than 1. Consequently, organizations with competing reporting period lengths are also considered competing.
The Regional Corporate Development Service requests you to develop a program that, given the reporting period length N (1 ≤ N ≤ 2*10^10) of a particular organization, determines the maximum number of organizations that can have non-competing periods with this organization, where the period is an integer not less than 2 and does not exceed N.
Input
The input consists of a single line containing the number N.
Output
The output should be a single number — the solution to the problem.