how to calculate earnings per share