The method of integral characteristics in X-ray diffraction studies of the structure of the surface layers of single crystals