Python3 simple solution
\nclass MKAverage:\n\n    def __init__(self, m: int, k: int):\n        self.values = [0] * m\n        self.m = m\n        self.k = k\n        self.idx = 0\n\n  
```\nclass MKAverage:\n\n    def __init__(self, m: int, k: int):\n        self.values = [0] * m\n        self.m = m\n        self.k = k\n        self.idx = 0\n\n    def addElement(self, num: int) -> None:\n        self.values[self.idx % self.m] = num\n        self.idx += 1\n\n    def calculateMKAverage(self) -> int:\n        if self.idx < self.m:\n            return -1\n        values = sorted(self.values)[self.k : -self.k]\n        return int(sum(values) / len(values))\n```
[]