A measurement of the total pp cross section at the LHC at s=7 TeV is presented. In a special run with high-β⋆ beam optics, an integrated luminosity of 80 μb−1 was accumulated in order to measure the differential elastic cross section as a function of the Mandelstam momentum transfer variable t. The measurement is performed with the ALFA sub-detector of ATLAS. Using a fit to the differential elastic cross section in the |t| range from 0.01 GeV2 to 0.1 GeV2 to extrapolate to |t|→0, the total cross section, σtot(pp→X), is measured via the optical theorem to be: σtot(pp→X)=95.35±0.38(stat.)±1.25(exp.)±0.37(extr.)mb, where the first error is statistical, the second accounts for all experimental systematic uncertainties and the last is related to uncertainties in the extrapolation to |t|→0. In addition, the slope of the elastic cross section at small |t| is determined to be B=19.73±0.14(stat.)±0.26(syst.) GeV−2.