#P1635. 跳跃
跳跃
Description
Little Frog C heard that NOIP will hold an anniversary contest and excitedly came to Z City. Initially, he is at coordinate . Little Frog C is good at jumping: if he is currently at coordinate , with each jump he can move to or . Due to stamina limits, he can make at most jumps.
According to the legend of Z City, any position whose coordinate is a multiple of (e.g., ) can teleport to YZOJ.
Little Frog C wants to know the minimum number of jumps needed to teleport to YZOJ.
Input Format
The first line contains an integer , the frog’s initial position, guaranteed to be in the range .
Output Format
Output a single integer, the minimum required number of steps. If he still cannot teleport to YZOJ within steps, output .
125000000
1
Hint
Translated by ChatGPT 5
京公网安备 11011102002149号