Calculating the value of b