How to use retained earnings formula on a balance sheet.