Optimal design of a three-stage heat exchanger network