Codility FrogJmp