Starting the pill the first day of your period

I started taking the pill the first day of my period. I'm now  I'm in day 3 of my period, while taking the pill at a consistent time. Can I have unprotected sex when I get off my period and will the pill be effective then?