Added binary indexed tree.