A correction to @Ninners's circuit.
The buttons do the same things as the original. The problem with the original? Well, pressing the right button sets the display to zero when the display was three OR HIGHER, so three was A magic number, not THE magic number.