Pump & Dump due to Meds

Lo
Hello! I was prescribed two medications that are not safe while breastfeeding, so now I need to pump and dump. My daughter has been exclusively breastfed with the exception of an ounce of formula on certain days. How often should I pump to keep my supply up so I can continue breastfeeding after the medication? And also, how often should I feed my baby formula? I know in the hospital it was every 3 hours. Thank you in advance. ☺️ btw, my baby is 3 weeks old.