Howto put advertising as post number 1,2,3 etc

You can use this property of WP_Query:

$current_post

(available during The Loop) Index of the post currently being displayed.

Let’s say you have your current version of loop:

<?php while ( have_posts() ): the_post(); ?>
    ... some code that is displaying current post
<?php endwhile; ?>

Change it to something like this:

<?php while ( have_posts() ): the_post(); ?>
    <?php global $wp_query; if ($wp_query->current_post == 2): ?>
    ... put advert here
    <?php else: ?>
    ... some code that is displaying current post
    <?php endif; ?>
<?php endwhile; ?>

You can, of course, change this condition: ($wp_query->current_post == 2) to anything you like.

So in your case it should look like this:

<?php
    if ( $wp_query->have_posts() ) :
        while ( $wp_query->have_posts() ) :
            $wp_query->the_post();
            if ( $wp_query->current_post == 2 ) {
                // put your advert here
            } else
                get_template_part( 'content', 'post' );
        endwhile;
    endif;
?>