Cosmological Constant from the Entropy Balance Condition