Find the average of a sequence