Yup you actually ovulate about 14 days from the first day of your period. So say your period last about 7 days, you have sex on that day sperm can stay inside of you for up to a week.
And 14 days is just an average, some women ovulate within 3 days of that(either before or after) Its possible(however not very common) for women to ovulate on their period.