Sum rule for the ADM mass and tensions in planar AdS spacetimes