(1)Whoever having been convicted of an offence under this Act commits an offence on a second or subsequent occasion within three years of the commission of a previous similar offence, no court shall, except for reasons to be stated in writing, impose on him a fine of less than one-fourth of the maximum amount of the fine impassable for such offence.