Would a plan b work if I had unprotected sex on my second day of ovulation?

Had unprotected sex that night and then had sex in the morning again without protection. Took a plan b 3 hours later that day. Will it work?