Adding an example of amortized analysis