The pill

How long have you to wait to have unprotected sex when just starting the pill? When will it be save?