under accounting principle, since no non-cash transaction involved, basically only calculate cash flow is sufficient. cash inflow = 100, cash outflow = -100-79-21=-197
total cash flow=-97, here dont consider 21-18 as a loss, but a gain, so max loss=18.
under econ ides, surplus being taken into account, simply add 21-18=3 back into accounting loss, so (100).