# Wonders Electric Engineers Do With Bulbs!

**Computer Science**Level 3

You sneak into the house of a famous Electical Engineer in your town.

You find a weird arrangement of 10000 bulbs and 10000 switches (which are numbered in ascending order) in front of you. You see the main power button to this and out of curiosity you press it and suddenly the door behind you gets locked and the bulbs start glowing and the switches start toggling on/off in a weird pattern.

After some time the glowing stops.In front of the arrangement a board reads as follows:

- During the first pulse all the switches (with corresponding numbers) that are divisible by 1 are switched on.
- During the second pulse all the numbers that are divisible by 2 toggle (change to on if it's off, or change to off if it's on).
- During the third pulse all the numbers that are divisible by 3 are made to toggle and so on until 10000 pulses.
- At the end of \(10000^\text{th}\) pulse let \(N\) denote the number of bulbs that are glowing and let \(S\) denote the sum of the corresponding numbers of the bulbs that are glowing.
- Enter the answer as \(N+S\) to open the door.