You are given a series of rainfall measurements. Your task is to compute the average rainfall. Negative measurement values indicate an error. Do not include those values in the average. The series is terminated by a sentinel value of 9999. Do not include the sentinel value or any values following it. You can rely on the fact that the sentinel value is present in the array.