In our example,
, the number of 1s in *D*_{i} (counter).

Let *t*_{i} = number of bits reset to 0 on the ith call to Increment.

Thus, the actual cost *c*_{i} is at most (cost of reset) + (cost to set one) =
.

We know that

Thus,

= 2

If , then for all i, and the total amortized cost is an upper bound to the actual cost.

The counter starts at zero, .

= O(2)

n calls is O(n)