The Method of Minimizing the Defects for the Stefan Problem