''Function to find the sum of all the elements which are less than or equal to index
def sum_bitree ( index ) : NEW_LINE INDENT s = 0 NEW_LINE while ( index > 0 ) : NEW_LINE INDENT s += BITree [ index ] NEW_LINE index -= ( index & ( - index ) ) NEW_LINE DEDENT return s NEW_LINE DEDENT