Calculation of the first term