Is there a way to multiply archive loop results sequentially?

<?php
$counter = 1; 

if(have_posts()) :  while(have_posts()) :  the_post(); 
?>
<?php
if($counter == 1) :
?>
            <div class="row clear" style="margin-bottom:0px;">
                <div class="col-md-12 border-12">
                    <a class="thumb" href="https://wordpress.stackexchange.com/questions/202991/<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('category-thumbnail'); ?></a>
                    <div class="blog-details-wrapper clear">
                    <h2 class="title">
                        <a href="https://wordpress.stackexchange.com/questions/202991/<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
                    </h2>
                        <span class="date"><?php the_time('F j, Y'); ?> <?php the_time('g:i a'); ?></span>
                        <span class="author"><?php _e( 'Published by', 'html5blank' ); ?> <?php the_author_posts_link(); ?></span>
                        <span class="comments"><?php if (comments_open( get_the_ID() ) ) comments_popup_link( __( 'Leave your thoughts', 'html5blank' ), __( '1 Comment', 'html5blank' ), __( '% Comments', 'html5blank' )); ?></span>
                    </div>
                </div>
            </div>

<?php

elseif($counter == 2) :
?>

            <div class="row">
                <div class="col-md-6 border">
                    <a class="thumb-6" href="https://wordpress.stackexchange.com/questions/202991/<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('category-thumbnail'); ?></a>
                    <div class="blog-details-wrapper clear">
                    <h2 class="">
                        <a href="https://wordpress.stackexchange.com/questions/202991/<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
                    </h2>
                        <span class="date"><?php the_time('F j, Y'); ?> <?php the_time('g:i a'); ?></span>
                        <span class="author"><?php _e( 'Published by', 'html5blank' ); ?> <?php the_author_posts_link(); ?></span>
                        <span class="comments"><?php if (comments_open( get_the_ID() ) ) comments_popup_link( __( 'Leave your thoughts', 'html5blank' ), __( '1 Comment', 'html5blank' ), __( '% Comments', 'html5blank' )); ?></span>
                    </div>
                </div>

<?php
elseif($counter >= 2) : ?>

                <div class="col-md-6 border">
                    <a class="thumb-6" href="https://wordpress.stackexchange.com/questions/202991/<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('category-thumbnail'); ?></a>
                    <div class="blog-details-wrapper clear">
                    <h2 class="">
                        <a href="https://wordpress.stackexchange.com/questions/202991/<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
                    </h2>
                        <span class="date"><?php the_time('F j, Y'); ?> <?php the_time('g:i a'); ?></span>
                        <span class="author"><?php _e( 'Published by', 'html5blank' ); ?> <?php the_author_posts_link(); ?></span>
                        <span class="comments"><?php if (comments_open( get_the_ID() ) ) comments_popup_link( __( 'Leave your thoughts', 'html5blank' ), __( '1 Comment', 'html5blank' ), __( '% Comments', 'html5blank' )); ?></span>
                    </div>
                </div>
            </div>  

<?php 
$counter = 0;
endif;
?>
<?php
$counter++;
endwhile;
endif;
?>

error code: 523