calculate accounting profit