Do I need to take plan b

I made the mistake of having sex with my boyfriend last night without any protection. He pulled out of course and I started my period literally right after. do I need to take a plan b pill?