in the situation of the ultimate order of foreclosure underneath any mortgage or cost affecting land, the lesser of, the value of the thought determined underneath clause (a) furthermore the quantity owed underneath the mortgage or cost at some time it really is foreclosed, including principal, curiosity and all other costs and bills in additio