I'm running a simulation that updates in a fixed time $dt$.

I have a car moving straight with initial velocity $v_0$. This car has to move exactly a distance $D$ in $t$ seconds (for simplicity, suppose $t = f \times dt$, where $f$ is an integer).

How can I find the deceleration for the car to stop exactly after traversing $D$?

---