how to calculate total compensation