My suggestion is to not count the life that is right before “no more possible switches“ this is because I obviously had no other choice than that one switch that I didn’t want to make in the first place so instead of it counting from my lives I’m suggesting that it shouldn’t be since the algorithm realised that after that switch, I had no other options