A tenancy at will may be terminated by either party by giving notice in writing. The time of the notice must be at least as long as the interval between the time rent is due or three months, whichever is less.