Tile jumping in

How can i write a program of tile jumping?
you can jump upto 3 tile if you are at tile 3.

I did not understand the question.