r granted thereon or any portion thereof shall be not less than 12?? per-centum of all the oil or gas produced except oil or gas used for production purposes on the claim, or unavoidably lost: Provided, however, That the provisions of this section shall not apply to lands reserved for the use of the Navy.