Retained Earnings Formula: Definition, Formula, and Example