Calculation of total earnings from a salary increase and sale