Consider a linear arrangement of seven bulbs, each of which can be in the ON or OFF state. The initial configuration of the bulbs is shown below. In every step, the states of the bulbs change based on the following rules:
- Any OFF bulb with exactly one ON neighbor at the end of the previous step is turned ON.
- Any ON bulb with both neighbors ON at the end of the previous step is turned OFF.
- The state of any bulb not meeting the conditions above is left unchanged.
The states of the bulbs at the end of Step 1 and Step 2 are also shown below.
| Stage | Bulb 1 | Bulb 2 | Bulb 3 | Bulb 4 | Bulb 5 | Bulb 6 | Bulb 7 |
|---|
| Initial | OFF | OFF | OFF | ON | OFF | OFF | OFF |
| Step 1 | OFF | OFF | ON | ON | ON | OFF | OFF |
| Step 2 | OFF | ON | ON | OFF | ON | ON | OFF |
The number of bulbs which are ON at the end of Step 8 is ______