eolymp
bolt
Try our new interface for solving problems
Problems

Anniversary

Anniversary

In the year 2134, when the Earth population reached \textbf{10^18} the people decided to celebrate this event. \textbf{N} diminutive bulbs (the linear size of each bulb was less than \textbf{0.1} millimeters) were placed on a huge area specially allotted for the celebration. The bulbs were numbered with consecutive integers from \textbf{1} to \textbf{N} in some order. In the beginning, all the bulbs were off. Afterwards, exactly \textbf{10^18} steps were performed - one per each citizen of Earth. At the \textbf{i}-th step, the states of all bulbs with number \textbf{X} such that \textbf{i} divides \textbf{X} toggled at the same time. If a bulb is on, toggling its state would switch it off, and vice versa, toggling the state of an off bulb would switch it on. The interval between the consecutive steps was only \textbf{1} picosecond, so the whole celebration took around a week and a half. Actually, all this stu looked as pointless ickering, but the spectators were delighted by the colossal scale of the wonderful event. Finally, it was over. There was nothing more to look at, and - if you think soberly - nothing worthy ever happened. In the meanwhile, after step \textbf{10^18}, some of the bulbs are still on. While the people are recovering from the shock, pondering why did they need such a celebration and who will cover its costs, we suggest that you count the number of bulbs which are still on and consume the precious power. \InputFile The only line of input contains the integer \textbf{N} (\textbf{1} ≤ \textbf{N} ≤ \textbf{2^63} -\textbf{ 1}). \OutputFile Print a single integer - the number of bulbs which are still on after step \textbf{10^18}.
Time limit 1 second
Memory limit 64 MiB
Input example #1
1
Output example #1
1
Author Ivan Metelsky
Source Winter School, Kharkov, 2011, Day 7