Understanding the Flajolet-Martin algorithm