Starting at 20m/s and losing 5m/s of speed every second,
it takes (20/5) = 4 seconds to stop.
The car's average speed during that time is (1/2)(20+0) = 10m/s.
At an average speed of 10m/s for 4s, it travels (10 x 4) = 40 meters.
The car's mass doesn't matter. With the same initial speed and
acceleration, the distance traveled would be the same for a car,
a leaf, or a battleship.