Sanket And His Game

0

0 votes
Easy
Problem

Sanket used to participate in various competitive coding competitions. Yesterday, because of no internet connectivity, Sanket wasn't able to participate. So, he decided to build a game. The game consists of balls of two different colors (say blue and green) and are numbered from 1 to N. If a blue ball is clicked, it changes to green and vice versa. Also, if M-numbered ball is clicked, then the colour of all other balls whose number is a multiple of M gets changed. Once the game is started, all the balls starting from 1 to N are clicked i.e., 1st ball is clicked and then 2nd and so on. The player need to determine the number of balls that will be green after the game gets completed.

Note: Initially, all the balls are blue.

Input Format:

The first and only line of input contains the number N i.e. number of balls in the game

Output Format:

Print the required answer on a single line.

Constraints:

1<=N<=10^9

Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

Sample Test Case Explaination

Initially, all the balls will be blue. After 1st ball is clicked, all the balls will be green. After 2nd ball is clicked, 2nd and 4th ball will be blue and 1st and 3rd ball will be green. After 3rd ball is clicked, 2nd, 3rd and 4th ball will be blue and 1st ball will be green. Finally, when last ball is clicked, 2nd and 3rd ball will be blue and 1st and 4th ball will be green.

Editor Image

?