Plan B

How much time after sex do I have to take the pill?