Click the light switch, don't spam it.
Using mod blocks, I was able to detect if the number is even or odd. Thanks for the idea, Bing AI.