No right in any marine vegetable deposit, thrown up by the sea or by a navigable river, shall be acquired by any person by his gathering it together upon any public beach, unless he removes it within twenty-four hours thereafter.