The present invention relates to a compound of formula (1) or a pharmaceutically acceptable salt thereof with therapeutic and prophylactic effects for a
disease associated with orexin
receptor type 2, specifically, a
disease such as
narcolepsy, idiopathic hypersomnia, hypersomnia,
sleep apnea syndrome, wherein R1 and R2 are each independently
hydrogen atom, etc.; R3 and R4 are each independently
hydrogen atom, etc.; R5 is optionally-substituted C1-4
alkyl; -L1-ring G is -ring G, -CH2-ring G, etc.; R6 is each independently
hydrogen atom, etc.; n is an integer of 1 or 2; ring G is optionally-substituted C6-10 aromatic carbocyclyl group, etc.; A1 is
oxygen atom, etc.; A2 is
oxygen atom, etc.; j, k, 1, and m are each independently an interger of 0, 1, or 2; dashed bond is
single bond or
double bond; X is -CR7-, etc.; R7 is
hydrogen atom, etc.; and ring E is formula (1a-1), (1a-2), or (1a-3).