Calculating the average weight