On January 1, an investment account is worth 300,000. M months later, the value has increased to 315,000 and 15,000 is withdrawn. 2M months prior to the end of the year, the account is again worth 315,000 and 15,000 is withdrawn. On December 31, the account is worth 315,000. The annual effective yield rate, using the dollar-weighted method, is 16%. Calculate M.