By the imposition of a fine not exceeding $350 or imprisonment for a period not exceeding six months, or both, for conviction of a first offense; for a conviction of a second offense, both of which were committed within a period of five years, by a fine of not less than $350 nor more than $700, or imprisonment for a period not exceeding six months, or both; and, for conviction of a third or subsequent offense, all of which were committed within a period of five years, by a fine of not less than $700 nor more than $1,000, or imprisonment for a period not exceeding six months, or both; or