Exact solution of the two-machine flow shop problem with three operations