loss reporting

How long can a company operate at a loss each year when it relates to high amount of expenses being written off.