Sex question?

Kary

I had unprotected sex with my husband Wednesday night and took a next day pill. I just had sex and he came inside will the pill still work? Or will i have to buy another one?