Any person who is convicted pursuant to Section 17995 for a second or subsequent time within a five-year period for violations at the same property shall be punishable by a fine not to exceed five thousand dollars ($5,000) or by imprisonment not exceeding six months, or both such fine and imprisonment.