The pill

I've been on the pill for a couple months and me and my boyfriend have both Protected sex and unprotected sex but I just recently got sick and had to get on medication and it messed with my birth control so we used condoms. I just stop using the medications the doctor gave me so my question is how long should you wait to have unprotected sex again since I'm not on the medications anymore