how to calculate terms of trade