Basically you can achieve this by using combinations of first, after and last
For example:
First store the page collection in a variable
{{ $pages := where .Paginator.Pages "Params.hidden" "ne" "true" }}
Then split the page collection into more variables according to your needs.
For example for 10 pages I would do:
{{ $firstgroup := first 3 $pages }}
{{ $secondgroup := first 5 (after 3 $pages) }}
{{ $lastgroup := last 2 $pages }}
Then
{{ range $firstgroup }}
<--- HTML for posts 1-3 --->
{{ end }}
<--- HTML for 1st advert --->
{{ range $secondgroup }}
<--- HTML for posts 4-8 --->
{{ end }}
<--- HTML for 2nd advert --->
{{ range $lastgroup }}
<--- HTML for posts 9-10 --->
{{ end }}