Pregnancy risk?

So how much time after getting on the pill for the first time does it take to become fully effective? In case I decide to have unprotected sex with my so, how long should I wait for the pill to do its job so it’s completely (i mean that 98%) safe?