An object of the present invention is to provide an antifungal agent which has excellent antifungal effects and is superior in terms of its physical properties, safety and metabolic stability. According to the present invention, there is disclosed a compound represented by the following formula (I), or a salt thereof:wherein R1, R2, X, Y, ring A, Z, R3 and R4 are as defined in the specification.