Displacement of a ship is calculated by