An atomic force microscope which is operated in the oscillating mode is an example of an impact oscillator. The description of such dynamical systems can be reduced to a mathematical mapping, which displays a square-root singularity. A direct consequence of this property is the emergence of an infinite series of period-adding bifurcations. This extremely characteristic phenomenon should be observed in atomic force microscopes. We consider an atomic force microscope in which the tip-substrate forces are modelled by a liquid-bridge interaction. By integrating the dynamical equations we show that the atomic force microscopy (AFM) dynamical behaviour has the same characteristic bifurcation scenario as the square-root map. We point to the remarkable role of the energy that is dissipated upon impact. We finally suggest ways to improve the operation of AFM.