Can you embed in the middle of a listing of posts?

I want to put a chunk of code after 5 blog posts (like an ad) and then the remaining posts. I have been trying to figure out how to do this but can't figure it out. Do I have to change query_post data into an array? Does anyone have any suggestions for me?

Thanks!
Helen