On the Subject of Not Losing NIM

Crunching numbers against an opponent that is impossible to beat.
Formula! Formula! Formula!

Let the number on the top display be M and the number on the middle display be N. Plug these values into the below formula:

S = N % (M + 1)

Enter S into the module by using the provided keypad and pressing the middle display to submit. If S ≠ N, a new N will be generated. Repeat the previous steps until S = N, at which point the module will solve.

Pressing the bottom display will clear your input.