Silly question...

So this is a by of a long winded question. My boyfriend and I had sex the day before I was due to stop my pill for a week (you know, for the period and egg stuff, yeah...) and he came inside me. I spoke to a friend and she said that sperm can live for up to 5 days? Is there any chance of getting pregnant?
This probably sounds ridiculous, but the sex ed I received was awful. I'm 17, I should know this😔
Thank you anyone who can help xxx