Upper limits on the total radiant energy of solar flares