Section 21. Whoever is convicted a third time of a violation of any provision of the preceding sections, except those contained in sections seven and eight, shall, in addition to the penalties before provided, be punished by imprisonment for not more than three months.