Provided is a novel compound having NPY Y5 receptor antagonistic activity. It was discovered that a compound represented by (1) (where R1 is an optionally substituted alkyl and the like; p, q, and r are each independently 0 or 1; ring A is an oxadiazole; and R2 is an optionally substituted alkyl, and the like) has NPY Y5 receptor antagonistic activity.