This invention provides a novel compound having NPY Y5 receptor antagonist effect. This invention discovers that the compound represented by the following formula has the NPY Y5 receptor antagonist effect. (in the formula, R1 represents a substituted or unsubstituted alkyl group and so on; p, q, and r each independently represents 0 or 1; ring A represents oxadiazole; R2 represents a substituted or unsubstituted alkyl group and so on).