When should I stop smoking weed?

So I’m starting medschool July 30 and my school is going to be conducting drug tests the week of orientation which is the first week anytime between July 30th and August 3rd. They say students can opt for a retest within a certain time frame if they fail the first time. Anyway, when should I stop smoking recreationally (about two times a week) so that I can pass the drug test? Btw recreational pot use is legal for people 21+ in my state.
Source: Student Doctor Network - Category: Universities & Medical Training Authors: Source Type: forums