Retained Earnings Formula: How to Get and Calculate It