Nanomechanical resonators have been used to weigh cells, biomolecules and gas molecules, and to study basic phenomena in surface science, such as phase transitions and diffusion. These experiments all rely on the ability of nanomechanical mass sensors to resolve small masses. Here, we report mass sensing experiments with a resolution of 1.7 yg (1 yg = 10(-24) g), which corresponds to the mass of one proton. The resonator is a carbon nanotube of length ∼150 nm that vibrates at a frequency of almost 2 GHz. This unprecedented level of sensitivity allows us to detect adsorption events of naphthalene molecules (C(10)H(8)), and to measure the binding energy of a xenon atom on the nanotube surface. These ultrasensitive nanotube resonators could have applications in mass spectrometry, magnetometry and surface science.