Period vs pregnancy

So super dumb question but! If you have unprotected sex like right before your period starts and then you have your period is there still a possibility you could be pregnant or does it automatically put you at ground zero no chance?