The step number is zero before the first timestep has been taken, and one after. The step number is one before the second timestep has been taken, and two after. This was not clear from the text.