Mock CCC '20 Contest 1 J2 - Letter Distribution

View as PDF

Submit solution

Points: 3
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type
Jonathan surrounded by his friends.

Jonathan has a letter he wants to hand out among his group of friends. Within this group, certain people share everything with each other. Specifically, if Jonathan has N friends and he were to label each of them from 1 to N, his i^{th} friend would share everything with all his other friends who are multiples of i. This applies to every friend except 1 who likes to keep to himself. Since Jonathan is lazy, he would like to know the minimum amount of letters he would have to hand out for every friend to see it. Can you help Jonathan out?

Input Specifications

A single integer N (1 \le N \le 10^6).

Output Specifications

The minimum number of letters Jonathan has to hand out.

Sample Input

5

Sample Output

4

Comments

There are no comments at the moment.