Lights [I]
You stand before an infinitely long corridor containing lights and their respective switches. You'd like to turn a subset of the lights on using little robots that will flick certain switches infinitely along the corridor.
In this first problem, you'll be sending an infinite number of robots. The robot will flick switches according the the following rule:
Robot flicks light switch if divides . In other words, the robot flicks every switch.
A light switch stays on if after all robots are done, it has been flicked an odd number of times. For example, Light Switch is on because it was flicked by Robots 1, 2 and 4. While Light Switch is off because it was flicked by Robots 1 and 5.
Input
Input will contain a single integer , representing how many lights we'll be considering
Output
Output will contain a single integer, representing the total number of lights at position at or before the light that are on at the end of execution
Constraints
Examples
Input
3
Output
1
Explanation
1 is the only light switch turned on
Input
4
Output
2
Explanation
1 and 4 are the only light switches turned on
Comments