Toothpaste and amortized complexity