bessie cow play sequence need help they start sequence initially contain number 0 perform n operation each operation follow Add integer xi ai element sequence Append integer ki end sequence and size sequence increase 1 remove element sequence so size sequence decrease note operation element sequence after operation cow like know average number sequence help