Calculating buoyant force and flotation