Carnot engine problem