Search for the chiral magnetic effect at the LHC with the CMS experiment