Last period of period + no condom + pulled out

Hi i have an emergency! Just had sex with my boyfriend on my last day of period, and we didn’t use condom when we did it. But then, he pulled out right away.. Do i need to take the pill or the chance is very slim that i don’t need to take one? X