The energy spectrum of cosmic rays beyond the turn-down around 1017 eV as measured with the surface detector of the Pierre Auger Observatory