The pill

I just started going on the pill and I’m just wondering if I have unprotected sex and he pre cums in me or a bit of cum goes into me I can’t get pregnant because I’m on the pill?