Optimal solution and reseting Boxes 2