save the previous 2 inputs.
Knowing them and the present input to output.
Just discard the older input stored in memory and store the newer one plus the current input.
A Mealy system with one input x and one output z such that z = 1 iff x has been 1 for three consecutive clock times.
A