Jump in state variable


I try to model the transition from one steady-state to the other;
one of the state-variables is the number of firms which usually evolves according to: M=M(-1)(1-delta)+Me
The problem is the following: upon impact of the shock the number M should drop, because some firms get bankrupt; afterwards M should evolve according to the above equation
Question: how can I manage that M develops differently in the first period?

One possible solution would be to give to flow-equations for M, where the first is valid in the first period and the second in the remaining periods but can I implement this?

Thanks and greetings

if M=M(-1)(1-delta)+Me

then give a shock to Me at t=0,
then M(0) will jump,
and since Me=0 for all remaining periods you’ll have
M(t)=M(t-1)(1-delta) for all t>0

thanks for you answer;
the problem with your solution is, that Me is endogenous and the drop in M also depends on endogenous varialbes;