An implementation of a Fenwick Tree (or Binary Indexed Tree).