You are playing a game, your goal in this game is to catch a frog that's leaping between natural numbers.
At first, the frog is found at the number $a \in \mathbb N$ which is not known to you. Each turn, you take a guess at where the frog is found.
If you are right - you win.
If you are wrong - the frog leaps $b \in \mathbb N$ numbers to the right. Meaning, if you got the first guess wrong, the frog is now at $a+b$. If you get the guess wrong again, it's now at $a+2b$.
Neither $a$ or $b$ are known to you. All you know is that they are natural numbers.
Propose an algorithm that will find the frog in a finite number of steps, regardless of what $a$ and $b$ are.
Additional challenge: Same question, but now $a,b \in \mathbb Z$.