An annoyed teacher asked her student to do the following:

(1) Start with the number 12. Go to step (2).

(2) Take the negative of the number reached at the end of the previous step. Go to step (3).

(3) Add 1 to the number reached at the end of the previous step. Go to step (4).

(4) Go back to step (2) unless you have already gone through step (3) a hundred times; if you have gone through step (3) a hundred times already, tell the teacher the last number you reached.

To the teacher's surprise, the student gave her the correct final answer within a minute. What was it?

tertre Apr 4, 2018