Simplest piston problem. I. Elastic collisions.