Pagination so that the last page is visible

Hello!

Is it possible to make pagination so that the last page is visible? For example 1, 2 .... 18.

Replies are visible only to logged in members with an active subscription.