Given the total distance Jihun can run, report which of the 5 m cone intervals he collapses in.
Easy3MathImplementationSimulationInterviewNo attempts yetTime limit1sMemory limit128 MBDahyun, the club treasurer, decided to make Jihun, the club president, do shuttle runs. Not the ordinary kind, but the version usually called a suicide run.
Four cones stand on one straight line, 5 m apart, starting 5 m from the start point. The fourth cone is therefore 20 m from the start point. Jihun runs from the start point to the first cone and back to the start point. He then runs to the second cone and back, and he repeats the same pattern for the third cone and the fourth cone in that order. One set is 100 m long.
A runner normally rests after finishing a set, but Dahyun has no intention of giving Jihun a break. The moment he touches the fourth cone and returns to the start point, Jihun sets off toward the first cone again. He repeats this without end until he collapses.
You are given, in meters, the distance Jihun can run before he collapses. Find the interval that contains the point where he collapsed.
The first line contains the distance Jihun can run before he collapses. This value is a natural number no greater than 10000.
Print the interval where Jihun collapsed as a single number. The start point is interval 0. The stretch that excludes the start point and runs up to and including the first cone is interval 1. The stretch that excludes the first cone and runs up to and including the second cone is interval 2, and the remaining intervals are numbered the same way.