class MedianFinder:

```
def __init__(self):
"""
Initialize your data structure here.
"""
self.l=[]
self.a=0
def addNum(self, num):
"""
Adds a num into the data structure.
:type num: int
:rtype: void
"""
self.l.append(num)
self.a+=num
def findMedian(self):
"""
Returns the median of current data stream
:rtype: float
"""
if len(self.l)%2!=0:
return int(self.l[(len(self.l)+1)/2-1])
else:
return int(self.a/len(self.l))
```