Loading repovive.com/contests/12/problems/B
You are standing on a ladder. Initially, you are at height , and you want to reach height .
In one jump, you must do exactly one of the following:
Find the minimum number of jumps needed to reach height from height .
It is allowed to go above height or below height during the process. Only the final height must be exactly .
The input contains one integer:
Output one integer, the minimum number of jumps needed.
You are already at height , so no jump is needed.
Two jumps of reach height . A single jump can only change the height by , , , or , so it cannot end at height .
One valid sequence is , ending at height .