It's not really 'arithmetic that makes you cringe' but this is a nice problem nonetheless...

There are 1000 numbered lockers in a line. All of them are closed.

First, you pass along the line, changing the door position (i.e. opening!) every door.

Then, you go back to the start, changing the door position (i.e. closing) every even-numbered door.

Then you go back to the start, changing the door position of every third door (i.e. closing door 3, opening door 6, closing door 9...).

Then you go back to the start, changing the door position of every fourth door.

Then every fifth door.

...

... Lastly, change the door position of door 1000.

How many doors are open, and how many are closed?