Fermi Large Area Telescope observations of the supernova remnant HESS J1731-347