'initialize your data structure here.
:type nums: List[int]'

def __init__(self, nums):

    if (not nums):
        return
    self.__nums = nums
    self.__bit = ([0] * (len(self.__nums) + 1))
    for i in xrange(1, len(self.__bit)):
        self.__bit[i] = (nums[(i - 1)] + self.__bit[(i - 1)])
    for i in reversed(xrange(1, len(self.__bit))):
        last_i = (i - (i & (- i)))
        self.__bit[i] -= self.__bit[last_i]
