Having sex after period

How long should i wait to have sex after im done with my period & not to get prego either??