Does anyone know how long after sex you can take plan B and have it be effective?

Be
I had unprotected sex.