Detecting Third button press

Just be aware when a switch is pushed/closed, you are attaching 5v to the input pin.