The average of the sequence

The average of the sequence. Determine the average of all elements in a sequence of non-negative integers, where the sequence ends with the number 0. Do not include the 0 in the calculation of the average.