Weird question

What if you have unprotected sex right before your period... can you get pregnant is that the same thing as ovulating??