Toggle Push Button Switch


I have this flow chart that works perfectly as it should. Namely three presses on the analog sensor pin 4, and output pin 1 goes high. The three presses is being implemented to avoid accidental switching.
The problem is that I am having some difficulty in turning it off. This is so in that I would like to press the analog sensor three times again and thus make pin 1 go low. Any help in this regard would be greatly appreciated.

View attachment Toggle Push Button Switch.plf