Fermi-Large Area Telescope observations of the flaring Sun