The present disclosure provides a compound having a STING (stimulator of interferon genes) agonistic activity, which may be expected to be useful as an agent for the prophylaxis or treatment of STING-related diseases, such as cancer. The present disclosure relates to a compound represented by the formula (I) wherein each symbol is as defined in the description, or a salt thereof.