Maximal temperature in a simple thermodynamical system