Set a variable like $count=''; before the loop and then put ´$count++;` within the loop. Then check if $count is 2 and put out your ad. That's it.
This is really basic php basics. You should really consider learn a few things, there are a lot places on the web to do so.