Peace be upon you. According to Ayatollah Khamenei, you must make up all the prayers you performed while in a state of major impurity (janabah) without having performed a proper ghusl. Regarding fasting, if you engaged in this act while fasting and were aware that it invalidates the fast, you must make up the fast and also provide a compensatory act (kaffarah). If you were unaware of this but knew it was forbidden, you must make up the fast and, as a precaution, also provide the kaffarah. If you were unaware of the prohibition, you only need to make up the fast. For the days following, if you were ignorant of the issue of janabah or were certain that fasting is valid while remaining in a state of janabah, you do not need to make up the fast, and your fast is considered valid. However, it is advisable to make it up in the latter case. If you were aware of the issue of janabah but uncertain about the obligation of ghusl, you should make up those days as a precaution. Otherwise, you must make up both the fast and the kaffarah. According to Ayatollah Sistani, you must make up any prayers you performed after becoming janabah until your first valid ghusl, whether obligatory or recommended, such as the Friday ghusl. If you are unsure of the number of prayers, it suffices to make up the certain ones, meaning the least number. You do not need to make up the fast if you were ignorant of the ruling and had a valid excuse for your ignorance. May you be successful in all good deeds.