Calculate degrees of unsaturation