There are $100$ lightbulbs $B_1, B_2, \ldots, B_{100}$ spaced evenly around a circle in this order. Additionally, there are $100$ switches $S_1, S_2, \ldots, S_{100}$ such that for all $1 \leq i \leq 100$, switch $S_i$ toggles the states of lights $B_{i-1}$ and $B_{i+1}$ (where $B_{101} = B_1$ and $B_0 = B_{100}$). Suppose David chooses whether to flick each switch with probability $\frac{1}{2}$. What is the expected number of lightbulbs which are on at the end of this process given that not all lightbulbs are off?

Let's think step by step and output the final answer within \boxed{}.
user